55 fShapeName->SetToolTipText(
"Enter the hyperboloid name");
69 fERin->Associate(
this);
90 fEDz->Resize(100,
fEDz->GetDefaultHeight());
93 fEDz->Associate(
this);
133 fUndo->Associate(
this);
157 fApply->Connect(
"Clicked()",
"TGeoHypeEditor",
this,
"DoApply()");
158 fUndo->Connect(
"Clicked()",
"TGeoHypeEditor",
this,
"DoUndo()");
159 fShapeName->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
160 fERin->Connect(
"ValueSet(Long_t)",
"TGeoHypeEditor",
this,
"DoRin()");
161 fERout->Connect(
"ValueSet(Long_t)",
"TGeoHypeEditor",
this,
"DoRout()");
162 fEDz->Connect(
"ValueSet(Long_t)",
"TGeoHypeEditor",
this,
"DoDz()");
163 fEStIn->Connect(
"ValueSet(Long_t)",
"TGeoHypeEditor",
this,
"DoStIn()");
164 fEStOut->Connect(
"ValueSet(Long_t)",
"TGeoHypeEditor",
this,
"DoStOut()");
165 fERin->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
166 fERout->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
167 fEDz->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
168 fEStIn->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
169 fEStOut->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoHypeEditor",
this,
"DoModified()");
188 const char *sname =
fShape->GetName();
189 if (!strcmp(sname,
fShape->ClassName()))
239 if ((dz <= 0) || (rin < 0) || (rin > rout) ||
240 (rin * rin + tin * tin * dz * dz > rout * rout + tout * tout * dz * dz)) {
251 fShape->SetDimensions(param);
260 fPad->GetView()->ShowAxis();
308 fERin->SetNumber(rin);
310 Double_t rinmax =
TMath::Sqrt((rout * rout + tout * tout * dz * dz) / (tin * tin * dz * dz));
313 rin = rinmax - 1.e-6;
314 fERin->SetNumber(rin);
333 Double_t routmin =
TMath::Sqrt((rin * rin + tin * tin * dz * dz) / (tout * tout * dz * dz));
335 if (rout < routmin) {
336 rout = routmin + 1.e-6;
392 tin = tinmax - 1.e-6;
424 if (tout < toutmin) {
425 tout = toutmin + 1.e-6;
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
externTGeoManager * gGeoManager
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual Bool_t IsComposite() const
This class handles GUI labels.
This class describes layout hints used by the layout classes.
TGNumberEntry is a number entry input widget with up/down buttons.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
void Update() override
Override Update from TGedFrame as fGedEditor can be null.
TGeoGedFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
void DoUndo()
Slot for undoing last operation.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoRin()
Slot for Rin.
void DoRout()
Slot for Rout.
void DoModified()
Slot for notifying modifications.
void DoStOut()
Slot for StOut.
void SetModel(TObject *obj) override
Connect to the selected object.
void DoName()
Slot for name.
void DoStIn()
Slot for StIn.
void DoApply()
Slot for applying current settings.
TGeoHypeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for Hype editor.
~TGeoHypeEditor() override
Destructor.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
Mother of all ROOT objects.
virtual TClass * IsA() const
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.