56 fShapeName->SetToolTipText(
"Enter the box name");
94 fEDz->Associate(
this);
95 fEDz->Resize(100,
fEDz->GetDefaultHeight());
115 fUndo->Associate(
this);
139 fApply->Connect(
"Clicked()",
"TGeoTubeEditor",
this,
"DoApply()");
140 fUndo->Connect(
"Clicked()",
"TGeoTubeEditor",
this,
"DoUndo()");
141 fShapeName->Connect(
"TextChanged(const char *)",
"TGeoTubeEditor",
this,
"DoModified()");
142 fERmin->Connect(
"ValueSet(Long_t)",
"TGeoTubeEditor",
this,
"DoRmin()");
143 fERmax->Connect(
"ValueSet(Long_t)",
"TGeoTubeEditor",
this,
"DoRmax()");
144 fEDz->Connect(
"ValueSet(Long_t)",
"TGeoTubeEditor",
this,
"DoDz()");
145 fERmin->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoTubeEditor",
this,
"DoRmin()");
146 fERmax->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoTubeEditor",
this,
"DoRmax()");
147 fEDz->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoTubeEditor",
this,
"DoDz()");
204 fShape->SetTubeDimensions(rmin, rmax, dz);
211 fPad->GetView()->ShowAxis();
245 if (rmax < rmin + 1.e-10) {
265 if (rmax < rmin + 1.e-10) {
316 fSPhi->SetRange(0., 720.);
367 fApply->Connect(
"Clicked()",
"TGeoTubeSegEditor",
this,
"DoApply()");
368 fUndo->Connect(
"Clicked()",
"TGeoTubeSegEditor",
this,
"DoUndo()");
369 fEPhi1->Connect(
"ValueSet(Long_t)",
"TGeoTubeSegEditor",
this,
"DoPhi1()");
370 fEPhi2->Connect(
"ValueSet(Long_t)",
"TGeoTubeSegEditor",
this,
"DoPhi2()");
373 fSPhi->Connect(
"PositionChanged()",
"TGeoTubeSegEditor",
this,
"DoPhi()");
414 if (phi1 > 360 - 1.e-10) {
418 if (phi2 < phi1 + 1.e-10) {
425 fSPhi->SetPosition(phi1, phi2);
439 if (phi2 - phi1 > 360.) {
443 if (phi2 < phi1 + 1.e-10) {
450 fSPhi->SetPosition(phi1, phi2);
485 if (rmin < 0 || rmax < rmin)
490 if ((phi2 - phi1) > 360.001) {
496 fSPhi->SetPosition(phi1, phi2);
505 fPad->GetView()->ShowAxis();
556 nef->
SetToolTipText(
"Enter the theta angle of the lower plane normal");
558 fEThlo->Connect(
"ValueSet(Long_t)",
"TGeoCtubEditor",
this,
"DoThlo()");
559 nef->
Connect(
"TextChanged(const char *)",
"TGeoCtubEditor",
this,
"DoModified()");
569 nef->
SetToolTipText(
"Enter the phi angle of the lower plane normal");
571 fEPhlo->Connect(
"ValueSet(Long_t)",
"TGeoCtubEditor",
this,
"DoPhlo()");
572 nef->
Connect(
"TextChanged(const char *)",
"TGeoCtubEditor",
this,
"DoModified()");
586 nef->
SetToolTipText(
"Enter the theta angle of the upper plane normal");
588 fEThhi->Connect(
"ValueSet(Long_t)",
"TGeoCtubEditor",
this,
"DoThhi()");
589 nef->
Connect(
"TextChanged(const char *)",
"TGeoCtubEditor",
this,
"DoModified()");
599 nef->
SetToolTipText(
"Enter the phi angle of the upper plane normal");
601 fEPhhi->Connect(
"ValueSet(Long_t)",
"TGeoCtubEditor",
this,
"DoPhhi()");
602 nef->
Connect(
"TextChanged(const char *)",
"TGeoCtubEditor",
this,
"DoModified()");
742 if (rmin < 0 || rmax < rmin)
747 if ((phi2 - phi1) > 360.001) {
753 fSPhi->SetPosition(phi1, phi2);
766 ((
TGeoCtub *)
fShape)->SetCtubDimensions(rmin, rmax, dz, phi1, phi2, lx, ly, lz, tx, ty, tz);
772 fPad->GetView()->ShowAxis();
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
The base class for composite widgets (menu bars, list boxes, etc.).
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
Dragging the slider will generate the event:
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 DoUndo() override
Slot for undoing last operation.
void DoPhlo()
Slot for phi1.
void DoThhi()
Slot for phi1.
~TGeoCtubEditor() override
Destructor.
TGeoCtubEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for cut tube editor.
void DoApply() override
Slot for applying modifications.
void SetModel(TObject *obj) override
Connect to the selected object.
void DoPhhi()
Slot for phi1.
void DoThlo()
Slot for phi1.
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.
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoRmax()
Slot for rmax.
void SetModel(TObject *obj) override
Connect to the selected object.
void DoRmin()
Slot for rmin.
TGCompositeFrame * fDFrame
~TGeoTubeEditor() override
Destructor.
void DoModified()
Slot for signaling modifications.
TGCompositeFrame * fBFrame
virtual void DoUndo()
Slot for undoing last operation.
TGeoTubeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for tube editor.
void DoName()
Perform name change.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual void DoApply()
Slot for applying modifications.
void DoApply() override
Slot for applying modifications.
TGeoTubeSegEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for tube segment editor.
void DoPhi2()
Slot for phi2.
void ConnectSignals2Slots() override
Connect signals to slots.
~TGeoTubeSegEditor() override
Destructor.
void DoPhi1()
Slot for phi1.
void DoPhi()
Slot for phi slider.
void DoUndo() override
Slot for undoing last operation.
void SetModel(TObject *obj) override
Connect to the selected object.
Mother of all ROOT objects.
virtual TClass * IsA() const
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .