64 fShapeName->SetToolTipText(
"Enter the polycone name");
76 fENz->Resize(100,
fENz->GetDefaultHeight());
79 fENz->Associate(
this);
110 fCan->SetContainer(cont);
135 fUndo->Associate(
this);
167 fENz->Connect(
"ValueSet(Long_t)",
"TGeoPconEditor",
this,
"DoNz()");
168 fEPhi1->Connect(
"ValueSet(Long_t)",
"TGeoPconEditor",
this,
"DoPhi()");
169 fEDPhi->Connect(
"ValueSet(Long_t)",
"TGeoPconEditor",
this,
"DoPhi()");
170 fApply->Connect(
"Clicked()",
"TGeoPconEditor",
this,
"DoApply()");
171 fUndo->Connect(
"Clicked()",
"TGeoPconEditor",
this,
"DoUndo()");
172 fShapeName->Connect(
"TextChanged(const char *)",
"TGeoPconEditor",
this,
"DoModified()");
186 const char *sname =
fShape->GetName();
187 if (!strcmp(sname,
fShape->ClassName()))
194 fENz->SetNumber(nsections);
224 for (isect =
fNsections; isect < inew; isect++) {
228 sect->
Connect(
"Changed(Int_t)",
"TGeoPconEditor",
this,
"DoSectionChange(Int_t)");
232 for (isect = inew; isect <
fNsections; isect++) {
243 fCan->MapSubwindows();
259 if (isect && (sect->
GetZ() < zmin)) {
262 sect->
SetZ(zmin + 1.);
336 if (nz !=
fShape->GetNz())
345 for (isect = 0; isect < nz; isect++) {
347 array[3 + 3 * isect] = sect->
GetZ();
348 array[4 + 3 * isect] = sect->
GetRmin();
349 array[5 + 3 * isect] = sect->
GetRmax();
351 fShape->SetDimensions(array);
358 fPad->GetView()->ShowAxis();
375 for (isect = 0; isect <
fNsections; isect++) {
387 fPad->GetView()->ShowAxis();
411 if (sectlo && z < sectlo->GetZ()) {
415 if (secthi && z > secthi->GetZ()) {
507 fEZ->Resize(40,
fEZ->GetDefaultHeight());
510 fEZ->Associate(
this);
557 Emit(
"Changed(Int_t)", i);
565 fEZ->Connect(
"ValueSet(Long_t)",
"TGeoPconSection",
this,
"DoZ()");
566 fERmin->Connect(
"ValueSet(Long_t)",
"TGeoPconSection",
this,
"DoRmin()");
567 fERmax->Connect(
"ValueSet(Long_t)",
"TGeoPconSection",
this,
"DoRmax()");
575 return fEZ->GetNumber();
583 return fERmin->GetNumber();
591 return fERmax->GetNumber();
633 if (rmin > rmax - 1.e-8)
645 if (rmax < rmin + 1.e-8)
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
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
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.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void MapWindow() override
map window
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 CreateSections(Int_t inew)
Change dynamically the number of sections.
void SetModel(TObject *obj) override
Connect to a given pcon.
virtual void DoUndo()
Slot for undoing last operation.
void DoModified()
Slot for signaling modifications.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoNz()
Change number of sections.
void DoSectionChange(Int_t i)
Change parameters of section isect;.
Bool_t CheckSections(Bool_t change=kFALSE)
Check validity of sections.
TGCompositeFrame * fBFrame
void DoName()
Perform name change.
TGCompositeFrame * fDFrame
TGeoPconEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for polycone editor.
void DoPhi()
Change phi range.
~TGeoPconEditor() override
Destructor.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoApply()
Slot for applying modifications.
void UpdateSections()
Update sections according fShape.
Utility frame used by TGeoPcon editor.
void SetZ(Double_t z)
Z value setter.
void SetRmin(Double_t rmin)
Rmin value setter.
void SetRmax(Double_t rmax)
Rmax value setter.
TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id)
Constructor.
~TGeoPconSection() override
Destructor.
void HideDaughters()
Hide daughter frames.
Double_t GetRmax() const
Rmax value getter.
virtual void Changed(Int_t i)
Emit Changed(Int_t) signal.
Double_t GetZ() const
Z value getter.
virtual void ConnectSignals2Slots()
Connect signals to slots.
Double_t GetRmin() const
Rmin value getter.
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
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
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.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.