Logo ROOT   6.14/05
Reference Guide
TGeoPconEditor.cxx
Go to the documentation of this file.
1 // @(#):$Id$
2 // Author: M.Gheata
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TGeoPconEditor
13 \ingroup Geometry_builder
14 
15 Editor for a TGeoPcon.
16 
17 \image html geom_pcon_pic.png
18 
19 \image html geom_pcon_ed.png
20 
21 */
22 
23 #include "TGeoPconEditor.h"
24 #include "TGeoTabManager.h"
25 #include "TGeoPcon.h"
26 #include "TGeoManager.h"
27 #include "TVirtualGeoPainter.h"
28 #include "TPad.h"
29 #include "TView.h"
30 #include "TGTab.h"
31 #include "TGComboBox.h"
32 #include "TGButton.h"
33 #include "TGTextEntry.h"
34 #include "TGNumberEntry.h"
35 #include "TGLabel.h"
36 
38 
41 };
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Constructor for polycone editor
45 
47  Int_t height, UInt_t options, Pixel_t back)
48  : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
49 {
50  fShape = 0;
51  fNsections = 0;
52  fSections = 0;
53  fNsecti = 0;
54  fPhi1i = 0;
55  fDPhii = 0;
56  fZi = 0;
57  fRmini = 0;
58  fRmaxi = 0;
61 
62  fLHsect = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0,0,2,2);
63 
64  // TextEntry for shape name
65  MakeTitle("Name");
66  fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kPCON_NAME);
68  fShapeName->SetToolTipText("Enter the polycone name");
69  fShapeName->Associate(this);
70  AddFrame(fShapeName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
71 
72  MakeTitle("Parameters");
73  // Number entry for Nsections
74  TGTextEntry *nef;
76  f1->AddFrame(new TGLabel(f1, "Nz"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
77  fENz = new TGNumberEntry(f1, 0., 5, kPCON_NZ);
81  nef = (TGTextEntry*)fENz->GetNumberEntry();
82  nef->SetToolTipText("Enter the number of Z sections");
83  fENz->Associate(this);
84  f1->AddFrame(fENz, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
85  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
86 
87  // Number entry for Phi1
88  f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
89  f1->AddFrame(new TGLabel(f1, "Phi1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
90  fEPhi1 = new TGNumberEntry(f1, 0., 5, kPCON_PHI1);
93  nef->SetToolTipText("Enter the starting phi angle [deg]");
94  fEPhi1->Associate(this);
95  f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
96  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
97 
98  // Number entry for Dphi
99  f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
100  f1->AddFrame(new TGLabel(f1, "Dphi"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
101  fEDPhi = new TGNumberEntry(f1, 0., 5, kPCON_DPHI);
104  nef = (TGTextEntry*)fEDPhi->GetNumberEntry();
105  nef->SetToolTipText("Enter the phi range [deg]");
106  fEDPhi->Associate(this);
107  f1->AddFrame(fEDPhi, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
108  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
109 
110  // TGCanvas containing sections
111  MakeTitle("Pcon sections");
112  fCan = new TGCanvas(this, 160, 200, kSunkenFrame | kDoubleBorder);
114  fCan->SetContainer(cont);
115  // labels for #i, Z, Rmin, Rmax
116  f1 = new TGCompositeFrame(cont, 160, 10, kHorizontalFrame | kFixedWidth);
117  f1->AddFrame(new TGLabel(f1, "#"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
118  f1->AddFrame(new TGLabel(f1, "Z"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
119  f1->AddFrame(new TGLabel(f1, "Rmin"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
120  f1->AddFrame(new TGLabel(f1, "Rmax"), new TGLayoutHints(kLHintsLeft, 2, 10, 6, 0));
121  cont->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0,0,0,0));
122  CreateSections(2);
123 
124  AddFrame(fCan, new TGLayoutHints(kLHintsLeft, 0, 0, 4, 4));
125 
126  // Delayed draw
128  fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
129  fDFrame->AddFrame(fDelayed, new TGLayoutHints(kLHintsLeft , 2, 2, 4, 4));
130  AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
131 
132  // Buttons
133  fBFrame = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
134  fApply = new TGTextButton(fBFrame, "Apply");
135  fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
136  fApply->Associate(this);
137  fUndo = new TGTextButton(fBFrame, "Undo");
138  fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight , 2, 2, 4, 4));
139  fUndo->Associate(this);
140  AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
142 }
143 
144 ////////////////////////////////////////////////////////////////////////////////
145 /// Destructor
146 
148 {
149  if (fSections) delete fSections;
150  if (fZi) delete [] fZi;
151  if (fRmini) delete [] fRmini;
152  if (fRmaxi) delete [] fRmaxi;
153  TGFrameElement *el;
154  TIter next(GetList());
155  while ((el = (TGFrameElement *)next())) {
156  if (el->fFrame->IsComposite())
158  }
159  Cleanup();
160 }
161 
162 ////////////////////////////////////////////////////////////////////////////////
163 /// Connect signals to slots.
164 
166 {
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()");
173  fInit = kFALSE;
174 }
175 
176 
177 ////////////////////////////////////////////////////////////////////////////////
178 /// Connect to a given pcon.
179 
181 {
182  if (obj == 0 || (obj->IsA() != TGeoPcon::Class())) {
183  SetActive(kFALSE);
184  return;
185  }
186  fShape = (TGeoPcon*)obj;
187  const char *sname = fShape->GetName();
188  if (!strcmp(sname, fShape->ClassName())) fShapeName->SetText("-no_name");
189  else fShapeName->SetText(sname);
190 
191  Int_t nsections = fShape->GetNz();
192  fNsecti = nsections;
193  fENz->SetNumber(nsections);
195  fPhi1i = fShape->GetPhi1();
197  fDPhii = fShape->GetDphi();
198  CreateSections(nsections);
199  UpdateSections();
200 
203 
205  SetActive();
206 }
207 
208 ////////////////////////////////////////////////////////////////////////////////
209 /// Change dynamically the number of sections.
210 
212 {
213  if (inew == fNsections) return;
214  if (!fSections) fSections = new TObjArray(8);
216  TGeoPconSection *sect;
217  Int_t isect;
218  // new sections requested
219  if (inew>fNsections) {
220  for (isect=fNsections; isect<inew; isect++) {
221  sect = new TGeoPconSection(cont, 150, 10, isect);
222  fSections->Add(sect);
223  cont->AddFrame(sect, fLHsect);
224  sect->Connect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
225  }
226  } else {
227  // some sections need to be removed
228  for (isect=inew; isect<fNsections; isect++) {
229  sect = (TGeoPconSection*)fSections->At(isect);
230  sect->HideDaughters();
231  cont->HideFrame(sect);
232  cont->RemoveFrame(sect);
233 // sect->Disconnect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
234  fSections->RemoveAt(isect);
235  delete sect;
236  }
237  }
238  fNsections = inew;
239  fCan->MapSubwindows();
240  cont->Layout();
241  cont->MapWindow();
242  fCan->Layout();
243 }
244 
245 ////////////////////////////////////////////////////////////////////////////////
246 /// Check validity of sections
247 
249 {
250  TGeoPconSection *sect;
251  Double_t zmin = 0;
252  Double_t rmin = 0, rmax = 1.;
253  for (Int_t isect=0; isect<fNsections; isect++) {
254  sect = (TGeoPconSection*)fSections->At(isect);
255  if (isect && (sect->GetZ()<zmin)) {
256  if (!change) return kFALSE;
257  sect->SetZ(zmin+1.);
258  }
259  zmin = sect->GetZ();
260  if (sect->GetRmin()<0 ||
261  (sect->GetRmax()<0) || ((sect->GetRmin()==0) && (sect->GetRmax()==0))) {
262  if (!change) return kFALSE;
263  sect->SetRmin(rmin);
264  sect->SetRmax(rmax);
265  }
266  rmin = sect->GetRmin();
267  rmax = sect->GetRmax();
268  }
269  return kTRUE;
270 }
271 
272 ////////////////////////////////////////////////////////////////////////////////
273 /// Update sections according fShape.
274 
276 {
277  if (fZi) delete [] fZi;
278  if (fRmini) delete [] fRmini;
279  if (fRmaxi) delete [] fRmaxi;
280  fZi = new Double_t[fNsections];
281  fRmini = new Double_t[fNsections];
282  fRmaxi = new Double_t[fNsections];
283  TGeoPconSection *sect;
284  for (Int_t isect=0; isect<fNsections; isect++) {
285  sect = (TGeoPconSection*)fSections->At(isect);
286  sect->SetZ(fShape->GetZ(isect));
287  fZi[isect] = fShape->GetZ(isect);
288  sect->SetRmin(fShape->GetRmin(isect));
289  fRmini[isect] = fShape->GetRmin(isect);
290  sect->SetRmax(fShape->GetRmax(isect));
291  fRmaxi[isect] = fShape->GetRmax(isect);
292  }
293 }
294 
295 ////////////////////////////////////////////////////////////////////////////////
296 /// Check if shape drawing is delayed.
297 
299 {
300  return (fDelayed->GetState() == kButtonDown);
301 }
302 
303 ////////////////////////////////////////////////////////////////////////////////
304 /// Perform name change
305 
307 {
308  DoModified();
309 }
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 /// Slot for applying modifications.
313 
315 {
316  const char *name = fShapeName->GetText();
317  if (strcmp(name,fShape->GetName())) fShape->SetName(name);
319  fUndo->SetEnabled();
320  if (!CheckSections()) return;
321  // check if number of sections changed
322  Bool_t recreate = kFALSE;
323  Int_t nz = fENz->GetIntNumber();
324  Double_t phi1 = fEPhi1->GetNumber();
325  Double_t dphi = fEDPhi->GetNumber();
326  if (nz != fShape->GetNz()) recreate = kTRUE;
327  TGeoPconSection *sect;
328  Int_t isect;
329  if (recreate) {
330  Double_t *array = new Double_t[3*(nz+1)];
331  array[0] = phi1;
332  array[1] = dphi;
333  array[2] = nz;
334  for (isect=0; isect<nz; isect++) {
335  sect = (TGeoPconSection*)fSections->At(isect);
336  array[3+3*isect] = sect->GetZ();
337  array[4+3*isect] = sect->GetRmin();
338  array[5+3*isect] = sect->GetRmax();
339  }
340  fShape->SetDimensions(array);
341  delete [] array;
342  if (fPad) {
344  TView *view = fPad->GetView();
345  if (!view) {
346  fShape->Draw();
347  fPad->GetView()->ShowAxis();
348  } else {
349  const Double_t *orig = fShape->GetOrigin();
350  view->SetRange(orig[0]-fShape->GetDX(), orig[1]-fShape->GetDY(), orig[2]-fShape->GetDZ(),
351  orig[0]+fShape->GetDX(), orig[1]+fShape->GetDY(), orig[2]+fShape->GetDZ());
352  Update();
353  }
354  } else Update();
355  }
356  return;
357  }
358  // No need to call SetDimensions
359  if (TMath::Abs(phi1-fShape->GetPhi1())>1.e-6) fShape->Phi1() = phi1;
360  if (TMath::Abs(dphi-fShape->GetDphi())>1.e-6) fShape->Dphi() = dphi;
361  for (isect=0; isect<fNsections; isect++) {
362  sect = (TGeoPconSection*)fSections->At(isect);
363  fShape->Z(isect) = sect->GetZ();
364  fShape->Rmin(isect) = sect->GetRmin();
365  fShape->Rmax(isect) = sect->GetRmax();
366  }
367  fShape->ComputeBBox();
368  if (fPad) {
370  TView *view = fPad->GetView();
371  if (!view) {
372  fShape->Draw();
373  fPad->GetView()->ShowAxis();
374  } else {
375  const Double_t *orig = fShape->GetOrigin();
376  view->SetRange(orig[0]-fShape->GetDX(), orig[1]-fShape->GetDY(), orig[2]-fShape->GetDZ(),
377  orig[0]+fShape->GetDX(), orig[1]+fShape->GetDY(), orig[2]+fShape->GetDZ());
378  Update();
379  }
380  } else Update();
381  }
382 }
383 
384 ////////////////////////////////////////////////////////////////////////////////
385 /// Change parameters of section isect;
386 
388 {
389  TGeoPconSection *sect, *sectlo=0, *secthi=0;
390  sect = (TGeoPconSection*)fSections->At(isect);
391  if (isect) sectlo = (TGeoPconSection*)fSections->At(isect-1);
392  if (isect<fNsections-1) secthi = (TGeoPconSection*)fSections->At(isect+1);
393  Double_t z = sect->GetZ();
394  if (sectlo && z<sectlo->GetZ()) {
395  z = sectlo->GetZ();
396  sect->SetZ(z);
397  }
398  if (secthi && z>secthi->GetZ()) {
399  z = secthi->GetZ();
400  sect->SetZ(z);
401  }
402  DoModified();
403  if (!IsDelayed()) DoApply();
404 }
405 
406 ////////////////////////////////////////////////////////////////////////////////
407 /// Change number of sections.
408 
410 {
411  Int_t nz = fENz->GetIntNumber();
412  if (nz < 2) {
413  nz = 2;
414  fENz->SetNumber(nz);
415  }
416  CreateSections(nz);
418  DoModified();
419  if (!IsDelayed()) DoApply();
420 }
421 
422 ////////////////////////////////////////////////////////////////////////////////
423 /// Change phi range.
424 
426 {
427  Double_t phi1 = fEPhi1->GetNumber();
428  Double_t dphi = fEDPhi->GetNumber();
429  if (TMath::Abs(phi1)>360) fEPhi1->SetNumber(0);
430  if (dphi>360) fEDPhi->SetNumber(360);
431  DoModified();
432  if (!IsDelayed()) DoApply();
433 }
434 
435 ////////////////////////////////////////////////////////////////////////////////
436 /// Slot for signaling modifications.
437 
439 {
440  fApply->SetEnabled();
441 }
442 
443 ////////////////////////////////////////////////////////////////////////////////
444 /// Slot for undoing last operation.
445 
447 {
452  TGeoPconSection *sect;
453  for (Int_t isect=0; isect<fNsections; isect++) {
454  sect = (TGeoPconSection*)fSections->At(isect);
455  sect->SetZ(fZi[isect]);
456  sect->SetRmin(fRmini[isect]);
457  sect->SetRmax(fRmaxi[isect]);
458  }
459  DoApply();
462 }
463 
464 /** \class TGeoPconSection
465 \ingroup Geometry_builder
466 
467 Utility frame used by TGeoPcon editor.
468 
469 */
470 
472 
473 ////////////////////////////////////////////////////////////////////////////////
474 /// Constructor.
475 
478 {
479  fNumber = id;
480  TGTextEntry *nef;
481  // Label with number
482  AddFrame(new TGLabel(this, TString::Format("#%i",id)), new TGLayoutHints(kLHintsLeft, 2, 4, 6, 0));
483 
484  // Z entry
485  fEZ = new TGNumberEntry(this, 0., 5);
486  fEZ->Resize(40,fEZ->GetDefaultHeight());
487  nef = (TGTextEntry*)fEZ->GetNumberEntry();
488  nef->SetToolTipText("Enter the Z position");
489  fEZ->Associate(this);
490  AddFrame(fEZ, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
491  // Rmin entry
492  fERmin = new TGNumberEntry(this, 0., 5);
495  nef = (TGTextEntry*)fERmin->GetNumberEntry();
496  nef->SetToolTipText("Enter the minimum radius");
497  fERmin->Associate(this);
498  AddFrame(fERmin, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
499  // Rmax entry
500  fERmax = new TGNumberEntry(this, 0., 5);
503  nef = (TGTextEntry*)fERmax->GetNumberEntry();
504  nef->SetToolTipText("Enter the maximum radius");
505  fERmax->Associate(this);
506  AddFrame(fERmax, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
507 
509  MapSubwindows();
510  Layout();
511 }
512 
513 ////////////////////////////////////////////////////////////////////////////////
514 /// Destructor
515 
517 {
518  Cleanup();
519 }
520 
521 ////////////////////////////////////////////////////////////////////////////////
522 /// Hide daughter frames
523 
525 {
526  fEZ->UnmapWindow();
527  fERmin->UnmapWindow();
528  fERmax->UnmapWindow();
529 }
530 
531 ////////////////////////////////////////////////////////////////////////////////
532 /// Emit Changed(Int_t) signal.
533 
535 {
536  Emit("Changed(Int_t)", i);
537 }
538 
539 ////////////////////////////////////////////////////////////////////////////////
540 /// Connect signals to slots.
541 
543 {
544  fEZ->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoZ()");
545  fERmin->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmin()");
546  fERmax->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmax()");
547 }
548 
549 ////////////////////////////////////////////////////////////////////////////////
550 /// Z value getter
551 
553 {
554  return fEZ->GetNumber();
555 }
556 
557 ////////////////////////////////////////////////////////////////////////////////
558 /// Rmin value getter
559 
561 {
562  return fERmin->GetNumber();
563 }
564 
565 ////////////////////////////////////////////////////////////////////////////////
566 /// Rmax value getter
567 
569 {
570  return fERmax->GetNumber();
571 }
572 
573 ////////////////////////////////////////////////////////////////////////////////
574 /// Z value setter
575 
577 {
578  fEZ->SetNumber(z);
579 }
580 
581 ////////////////////////////////////////////////////////////////////////////////
582 /// Rmin value setter
583 
585 {
586  fERmin->SetNumber(rmin);
587 }
588 
589 ////////////////////////////////////////////////////////////////////////////////
590 /// Rmax value setter
591 
593 {
594  fERmax->SetNumber(rmax);
595 }
596 
597 ////////////////////////////////////////////////////////////////////////////////
598 /// Z slot.
599 
601 {
602  Changed(fNumber);
603 }
604 
605 ////////////////////////////////////////////////////////////////////////////////
606 /// Rmin slot.
607 
609 {
610  Double_t rmin = fERmin->GetNumber();
611  Double_t rmax = fERmax->GetNumber();
612  if (rmin>rmax-1.e-8) fERmin->SetNumber(rmax);
613  Changed(fNumber);
614 }
615 
616 ////////////////////////////////////////////////////////////////////////////////
617 /// Rmax slot.
618 
620 {
621  Double_t rmin = fERmin->GetNumber();
622  Double_t rmax = fERmax->GetNumber();
623  if (rmax<rmin+1.e-8) fERmax->SetNumber(rmin);
624  Changed(fNumber);
625 }
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1172
TGNumberEntry * fERmax
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
TGNumberEntry * fEPhi1
An array of TObjects.
Definition: TObjArray.h:37
Double_t * GetZ() const
Definition: TGeoPcon.h:79
Double_t GetDphi() const
Definition: TGeoPcon.h:72
TGCheckButton * fDelayed
virtual void SetDimensions(Double_t *param)
Set polycone dimensions starting from an array.
Definition: TGeoPcon.cxx:1208
virtual Double_t GetDX() const
Definition: TGeoBBox.h:70
virtual ~TGeoPconEditor()
Destructor.
virtual void SetModel(TObject *obj)
Connect to a given pcon.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
virtual ~TGeoPconSection()
Destructor.
TVirtualGeoPainter * GetPainter() const
Definition: TGeoManager.h:191
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
A polycone.
Definition: TGeoPcon.h:17
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGeoPcon * fShape
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TGeoPconEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for polycone editor.
virtual void SetNumber(Double_t val)
See TView3D.
Definition: TView.h:25
virtual void SetContainer(TGFrame *f)
Definition: TGCanvas.h:232
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Double_t & Rmin(Int_t ipl)
Definition: TGeoPcon.h:90
virtual Bool_t IsPaintingShape() const =0
void DoSectionChange(Int_t i)
Change parameters of section isect;.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t & Phi1()
Definition: TGeoPcon.h:88
void CreateSections(Int_t inew)
Change dynamically the number of sections.
TGCompositeFrame * fBFrame
virtual Bool_t IsComposite() const
Definition: TGFrame.h:259
TGFrame * GetContainer() const
Definition: TGCanvas.h:226
TObject * At(Int_t idx) const
Definition: TObjArray.h:165
Double_t * fRmaxi
TGNumberEntry * fERmin
Short_t Abs(Short_t d)
Definition: TMathBase.h:108
Double_t * fRmini
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
TGeoPconSection(const TGWindow *p, UInt_t w, UInt_t h, Int_t id)
Constructor.
Double_t & Dphi()
Definition: TGeoPcon.h:89
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1131
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
virtual void DoUndo()
Slot for undoing last operation.
void DoRmax()
Rmax slot.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:128
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Definition: TString.cxx:2286
ULong_t Pixel_t
Definition: GuiTypes.h:39
Double_t GetRmin() const
Rmin value getter.
virtual Long_t GetIntNumber() const
void Class()
Definition: Class.C:29
TGCanvas * fCan
Int_t GetNz() const
Definition: TGeoPcon.h:73
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGCompositeFrame(const TGCompositeFrame &)
void DoNz()
Change number of sections.
virtual TList * GetList() const
Definition: TGFrame.h:369
TGTextEntry * fShapeName
XFontStruct * id
Definition: TGX11.cxx:108
virtual EButtonState GetState() const
Definition: TGButton.h:112
TGViewPort * GetViewPort() const
Definition: TGCanvas.h:227
void SetRmax(Double_t rmax)
Rmax value setter.
virtual TView * GetView() const =0
Bool_t CheckSections(Bool_t change=kFALSE)
Check validity of sections.
void DoRmin()
Rmin slot.
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:248
Double_t * GetRmax() const
Definition: TGeoPcon.h:77
Editor for a TGeoPcon.
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...
Definition: TQObject.cxx:867
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
Double_t * GetRmin() const
Definition: TGeoPcon.h:75
void SetZ(Double_t z)
Z value setter.
void HideDaughters()
Hide daughter frames.
virtual void SetSize(const TGDimension &s)
Definition: TGFrame.h:299
TGNumberEntry * fENz
virtual void MapSubwindows()
Map all canvas sub windows.
Definition: TGCanvas.cxx:2162
TGNumberEntry * fEDPhi
void SetNumStyle(EStyle style)
TGTextButton * fUndo
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
Definition: TObjArray.cxx:678
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
void DoName()
Perform name change.
Double_t GetRmax() const
Rmax value getter.
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void ComputeBBox()
compute bounding box of the pcon Check if the sections are in increasing Z order
Definition: TGeoPcon.cxx:285
virtual const Double_t * GetOrigin() const
Definition: TGeoBBox.h:73
void UpdateSections()
Update sections according fShape.
void DoZ()
Z slot.
TGFrame * fFrame
Definition: TGLayout.h:119
virtual void ShowAxis()=0
virtual Double_t GetDY() const
Definition: TGeoBBox.h:71
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
#define h(i)
Definition: RSha256.hxx:106
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoPhi()
Change phi range.
const Bool_t kFALSE
Definition: RtypesCore.h:88
TGDimension GetSize() const
Definition: TGFrame.h:277
Double_t GetPhi1() const
Definition: TGeoPcon.h:71
const char * GetText() const
Definition: TGTextEntry.h:134
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
#define ClassImp(name)
Definition: Rtypes.h:359
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:562
double Double_t
Definition: RtypesCore.h:55
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:409
Bool_t fIsShapeEditable
virtual Double_t GetNumber() const
virtual void ConnectSignals2Slots()
Connect signals to slots.
Utility frame used by TGeoPcon editor.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
TGTextButton * fApply
virtual void UnmapWindow()
Definition: TGFrame.h:253
Double_t & Z(Int_t ipl)
Definition: TGeoPcon.h:92
virtual void Layout()
Create layout for canvas.
Definition: TGCanvas.cxx:2226
Bool_t fInit
Definition: TGedFrame.h:53
TGNumberEntryField * GetNumberEntry() const
void SetRmin(Double_t rmin)
Rmin value setter.
TObjArray * fSections
virtual void MapWindow()
Definition: TGFrame.h:251
TGNumberEntry * fEZ
TF1 * f1
Definition: legend1.C:11
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
void DoModified()
Slot for signaling modifications.
TGLayoutHints * fLHsect
void Add(TObject *obj)
Definition: TObjArray.h:73
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:165
Double_t & Rmax(Int_t ipl)
Definition: TGeoPcon.h:91
Double_t GetZ() const
Z value getter.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
TVirtualPad * fPad
Definition: TGeoGedFrame.h:18
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void Draw(Option_t *option="")
Draw this shape.
Definition: TGeoShape.cxx:721
virtual void DoApply()
Slot for applying modifications.
TGCompositeFrame * fDFrame
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:96
ETGeoPconWid
char name[80]
Definition: TGX11.cxx:109
UInt_t GetDefaultHeight() const
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
virtual void Changed(Int_t i)
Emit Changed(Int_t) signal.
virtual Double_t GetDZ() const
Definition: TGeoBBox.h:72
Double_t * fZi