55 fShapeName->SetToolTipText(
"Enter the cone name");
118 fEDz->Associate(
this);
119 fEDz->Resize(100,
fEDz->GetDefaultHeight());
139 fUndo->Associate(
this);
163 fApply->Connect(
"Clicked()",
"TGeoConeEditor",
this,
"DoApply()");
164 fUndo->Connect(
"Clicked()",
"TGeoConeEditor",
this,
"DoUndo()");
165 fShapeName->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoModified()");
166 fERmin1->Connect(
"ValueSet(Long_t)",
"TGeoConeEditor",
this,
"DoRmin1()");
167 fERmin2->Connect(
"ValueSet(Long_t)",
"TGeoConeEditor",
this,
"DoRmin2()");
168 fERmax1->Connect(
"ValueSet(Long_t)",
"TGeoConeEditor",
this,
"DoRmax1()");
169 fERmax2->Connect(
"ValueSet(Long_t)",
"TGeoConeEditor",
this,
"DoRmax2()");
170 fEDz->Connect(
"ValueSet(Long_t)",
"TGeoConeEditor",
this,
"DoDz()");
171 fERmin1->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoRmin1()");
172 fERmin2->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoRmin2()");
173 fERmax1->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoRmax1()");
174 fERmax2->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoRmax2()");
175 fEDz->GetNumberEntry()->Connect(
"TextChanged(const char *)",
"TGeoConeEditor",
this,
"DoDz()");
239 if (rmin1 < 0 || rmin1 > rmax1)
241 if (rmin2 < 0 || rmin2 > rmax2)
245 if (rmin1 == rmax1 && rmin2 == rmax2)
247 fShape->SetConeDimensions(dz, rmin1, rmax1, rmin2, rmax2);
253 fPad->GetView()->ShowAxis();
396 fSPhi->SetRange(0., 720.);
447 fApply->Connect(
"Clicked()",
"TGeoConeSegEditor",
this,
"DoApply()");
448 fUndo->Connect(
"Clicked()",
"TGeoConeSegEditor",
this,
"DoUndo()");
449 fEPhi1->Connect(
"ValueSet(Long_t)",
"TGeoConeSegEditor",
this,
"DoPhi1()");
450 fEPhi2->Connect(
"ValueSet(Long_t)",
"TGeoConeSegEditor",
this,
"DoPhi2()");
453 fSPhi->Connect(
"PositionChanged()",
"TGeoConeSegEditor",
this,
"DoPhi()");
498 if (phi1 > 360 - 1.e-10) {
502 if (phi2 < phi1 + 1.e-10) {
509 fSPhi->SetPosition(phi1, phi2);
523 if (phi2 - phi1 > 360.) {
527 if (phi2 < phi1 + 1.e-10) {
534 fSPhi->SetPosition(phi1, phi2);
569 if (rmin1 < 0 || rmax1 < rmin1)
573 if (rmin2 < 0 || rmax2 < rmin2)
578 if ((phi2 - phi1) > 360.001) {
584 fSPhi->SetPosition(phi1, phi2);
587 ((
TGeoConeSeg *)
fShape)->SetConsDimensions(dz, rmin1, rmax1, rmin2, rmax2, phi1, phi2);
593 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:
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
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.
TGCompositeFrame * fDFrame
void DoModified()
Slot for modifying current parameters.
virtual void ConnectSignals2Slots()
Connect signals to slots.
~TGeoConeEditor() override
Destructor.
void DoRmin2()
Slot for Rmin2.
virtual void DoUndo()
Slot for undoing current operation.
TGeoConeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoName()
Slot for name.
TGCompositeFrame * fBFrame
void DoRmin1()
Slot for Rmin1.
void DoRmax1()
Slot for Rmax1.
void SetModel(TObject *obj) override
Connect to the selected object.
void DoRmax2()
Slot for Rmax2.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual void DoApply()
Slot for applying current parameters.
void DoPhi1()
Slot for Phi1.
~TGeoConeSegEditor() override
Destructor.
TGeoConeSegEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for cone segment editor.
void SetModel(TObject *obj) override
Connect to the selected object.
void ConnectSignals2Slots() override
Connect signals to slots.
void DoUndo() override
Slot for undoing last operation.
void DoPhi2()
Slot for Phi2.
void DoApply() override
Slot for applying current parameters.
void DoPhi()
Slot for Phi.
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.
Mother of all ROOT objects.
virtual TClass * IsA() const
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.