ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TGeoPconEditor //
15 // //
16 //////////////////////////////////////////////////////////////////////////
17 //Begin_Html
18 /*
19 <img src="gif/pcon_pic.gif">
20 */
21 //End_Html
22 //Begin_Html
23 /*
24 <img src="gif/pcon_ed.jpg">
25 */
26 //End_Html
27 
28 #include "TGeoPconEditor.h"
29 #include "TGeoTabManager.h"
30 #include "TGeoPcon.h"
31 #include "TGeoManager.h"
32 #include "TVirtualGeoPainter.h"
33 #include "TPad.h"
34 #include "TView.h"
35 #include "TGTab.h"
36 #include "TGComboBox.h"
37 #include "TGButton.h"
38 #include "TGTextEntry.h"
39 #include "TGNumberEntry.h"
40 #include "TGLabel.h"
41 
43 
44 enum ETGeoPconWid {
45  kPCON_NAME, kPCON_NZ, kPCON_PHI1, kPCON_DPHI, kPCON_APPLY, kPCON_UNDO
46 };
47 
48 ////////////////////////////////////////////////////////////////////////////////
49 /// Constructor for polycone editor
50 
52  Int_t height, UInt_t options, Pixel_t back)
53  : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
54 {
55  fShape = 0;
56  fNsections = 0;
57  fSections = 0;
58  fNsecti = 0;
59  fPhi1i = 0;
60  fDPhii = 0;
61  fZi = 0;
62  fRmini = 0;
63  fRmaxi = 0;
66 
67  fLHsect = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0,0,2,2);
68 
69  // TextEntry for shape name
70  MakeTitle("Name");
71  fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kPCON_NAME);
73  fShapeName->SetToolTipText("Enter the polycone name");
74  fShapeName->Associate(this);
75  AddFrame(fShapeName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
76 
77  MakeTitle("Parameters");
78  // Number entry for Nsections
79  TGTextEntry *nef;
81  f1->AddFrame(new TGLabel(f1, "Nz"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
82  fENz = new TGNumberEntry(f1, 0., 5, kPCON_NZ);
86  nef = (TGTextEntry*)fENz->GetNumberEntry();
87  nef->SetToolTipText("Enter the number of Z sections");
88  fENz->Associate(this);
89  f1->AddFrame(fENz, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
90  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
91 
92  // Number entry for Phi1
93  f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
94  f1->AddFrame(new TGLabel(f1, "Phi1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
95  fEPhi1 = new TGNumberEntry(f1, 0., 5, kPCON_PHI1);
98  nef->SetToolTipText("Enter the starting phi angle [deg]");
99  fEPhi1->Associate(this);
100  f1->AddFrame(fEPhi1, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
101  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
102 
103  // Number entry for Dphi
104  f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
105  f1->AddFrame(new TGLabel(f1, "Dphi"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
106  fEDPhi = new TGNumberEntry(f1, 0., 5, kPCON_DPHI);
109  nef = (TGTextEntry*)fEDPhi->GetNumberEntry();
110  nef->SetToolTipText("Enter the phi range [deg]");
111  fEDPhi->Associate(this);
112  f1->AddFrame(fEDPhi, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
113  AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
114 
115  // TGCanvas containing sections
116  MakeTitle("Pcon sections");
117  fCan = new TGCanvas(this, 160, 200, kSunkenFrame | kDoubleBorder);
119  fCan->SetContainer(cont);
120  // labels for #i, Z, Rmin, Rmax
121  f1 = new TGCompositeFrame(cont, 160, 10, kHorizontalFrame | kFixedWidth);
122  f1->AddFrame(new TGLabel(f1, "#"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
123  f1->AddFrame(new TGLabel(f1, "Z"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
124  f1->AddFrame(new TGLabel(f1, "Rmin"), new TGLayoutHints(kLHintsLeft, 2, 20, 6, 0));
125  f1->AddFrame(new TGLabel(f1, "Rmax"), new TGLayoutHints(kLHintsLeft, 2, 10, 6, 0));
126  cont->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0,0,0,0));
127  CreateSections(2);
128 
129  AddFrame(fCan, new TGLayoutHints(kLHintsLeft, 0, 0, 4, 4));
130 
131  // Delayed draw
133  fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
134  fDFrame->AddFrame(fDelayed, new TGLayoutHints(kLHintsLeft , 2, 2, 4, 4));
135  AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
136 
137  // Buttons
138  fBFrame = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
139  fApply = new TGTextButton(fBFrame, "Apply");
140  fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
141  fApply->Associate(this);
142  fUndo = new TGTextButton(fBFrame, "Undo");
143  fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight , 2, 2, 4, 4));
144  fUndo->Associate(this);
145  AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
147 }
148 
149 ////////////////////////////////////////////////////////////////////////////////
150 /// Destructor
151 
153 {
154  if (fSections) delete fSections;
155  if (fZi) delete [] fZi;
156  if (fRmini) delete [] fRmini;
157  if (fRmaxi) delete [] fRmaxi;
158  TGFrameElement *el;
159  TIter next(GetList());
160  while ((el = (TGFrameElement *)next())) {
161  if (el->fFrame->IsComposite())
163  }
164  Cleanup();
165 }
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 /// Connect signals to slots.
169 
171 {
172  fENz->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoNz()");
173  fEPhi1->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoPhi()");
174  fEDPhi->Connect("ValueSet(Long_t)", "TGeoPconEditor", this, "DoPhi()");
175  fApply->Connect("Clicked()", "TGeoPconEditor", this, "DoApply()");
176  fUndo->Connect("Clicked()", "TGeoPconEditor", this, "DoUndo()");
177  fShapeName->Connect("TextChanged(const char *)", "TGeoPconEditor", this, "DoModified()");
178  fInit = kFALSE;
179 }
180 
181 
182 ////////////////////////////////////////////////////////////////////////////////
183 /// Connect to a given pcon.
184 
186 {
187  if (obj == 0 || (obj->IsA() != TGeoPcon::Class())) {
188  SetActive(kFALSE);
189  return;
190  }
191  fShape = (TGeoPcon*)obj;
192  const char *sname = fShape->GetName();
193  if (!strcmp(sname, fShape->ClassName())) fShapeName->SetText("-no_name");
194  else fShapeName->SetText(sname);
195 
196  Int_t nsections = fShape->GetNz();
197  fNsecti = nsections;
198  fENz->SetNumber(nsections);
200  fPhi1i = fShape->GetPhi1();
202  fDPhii = fShape->GetDphi();
203  CreateSections(nsections);
204  UpdateSections();
205 
208 
210  SetActive();
211 }
212 
213 ////////////////////////////////////////////////////////////////////////////////
214 /// Change dynamically the number of sections.
215 
217 {
218  if (inew == fNsections) return;
219  if (!fSections) fSections = new TObjArray(8);
221  TGeoPconSection *sect;
222  Int_t isect;
223  // new sections requested
224  if (inew>fNsections) {
225  for (isect=fNsections; isect<inew; isect++) {
226  sect = new TGeoPconSection(cont, 150, 10, isect);
227  fSections->Add(sect);
228  cont->AddFrame(sect, fLHsect);
229  sect->Connect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
230  }
231  } else {
232  // some sections need to be removed
233  for (isect=inew; isect<fNsections; isect++) {
234  sect = (TGeoPconSection*)fSections->At(isect);
235  sect->HideDaughters();
236  cont->HideFrame(sect);
237  cont->RemoveFrame(sect);
238 // sect->Disconnect("Changed(Int_t)", "TGeoPconEditor", this, "DoSectionChange(Int_t)");
239  fSections->RemoveAt(isect);
240  delete sect;
241  }
242  }
243  fNsections = inew;
244  fCan->MapSubwindows();
245  cont->Layout();
246  cont->MapWindow();
247  fCan->Layout();
248 }
249 
250 ////////////////////////////////////////////////////////////////////////////////
251 /// Check validity of sections
252 
254 {
255  TGeoPconSection *sect;
256  Double_t zmin = 0;
257  Double_t rmin = 0, rmax = 1.;
258  for (Int_t isect=0; isect<fNsections; isect++) {
259  sect = (TGeoPconSection*)fSections->At(isect);
260  if (isect && (sect->GetZ()<zmin)) {
261  if (!change) return kFALSE;
262  sect->SetZ(zmin+1.);
263  }
264  zmin = sect->GetZ();
265  if (sect->GetRmin()<0 ||
266  (sect->GetRmax()<0) || ((sect->GetRmin()==0) && (sect->GetRmax()==0))) {
267  if (!change) return kFALSE;
268  sect->SetRmin(rmin);
269  sect->SetRmax(rmax);
270  }
271  rmin = sect->GetRmin();
272  rmax = sect->GetRmax();
273  }
274  return kTRUE;
275 }
276 
277 ////////////////////////////////////////////////////////////////////////////////
278 /// Update sections according fShape.
279 
281 {
282  if (fZi) delete [] fZi;
283  if (fRmini) delete [] fRmini;
284  if (fRmaxi) delete [] fRmaxi;
285  fZi = new Double_t[fNsections];
286  fRmini = new Double_t[fNsections];
287  fRmaxi = new Double_t[fNsections];
288  TGeoPconSection *sect;
289  for (Int_t isect=0; isect<fNsections; isect++) {
290  sect = (TGeoPconSection*)fSections->At(isect);
291  sect->SetZ(fShape->GetZ(isect));
292  fZi[isect] = fShape->GetZ(isect);
293  sect->SetRmin(fShape->GetRmin(isect));
294  fRmini[isect] = fShape->GetRmin(isect);
295  sect->SetRmax(fShape->GetRmax(isect));
296  fRmaxi[isect] = fShape->GetRmax(isect);
297  }
298 }
299 
300 ////////////////////////////////////////////////////////////////////////////////
301 /// Check if shape drawing is delayed.
302 
304 {
305  return (fDelayed->GetState() == kButtonDown);
306 }
307 
308 ////////////////////////////////////////////////////////////////////////////////
309 /// Perform name change
310 
312 {
313  DoModified();
314 }
315 
316 ////////////////////////////////////////////////////////////////////////////////
317 /// Slot for applying modifications.
318 
320 {
321  const char *name = fShapeName->GetText();
322  if (strcmp(name,fShape->GetName())) fShape->SetName(name);
324  fUndo->SetEnabled();
325  if (!CheckSections()) return;
326  // check if number of sections changed
327  Bool_t recreate = kFALSE;
328  Int_t nz = fENz->GetIntNumber();
329  Double_t phi1 = fEPhi1->GetNumber();
330  Double_t dphi = fEDPhi->GetNumber();
331  if (nz != fShape->GetNz()) recreate = kTRUE;
332  TGeoPconSection *sect;
333  Int_t isect;
334  if (recreate) {
335  Double_t *array = new Double_t[3*(nz+1)];
336  array[0] = phi1;
337  array[1] = dphi;
338  array[2] = nz;
339  for (isect=0; isect<nz; isect++) {
340  sect = (TGeoPconSection*)fSections->At(isect);
341  array[3+3*isect] = sect->GetZ();
342  array[4+3*isect] = sect->GetRmin();
343  array[5+3*isect] = sect->GetRmax();
344  }
345  fShape->SetDimensions(array);
346  delete [] array;
347  if (fPad) {
349  TView *view = fPad->GetView();
350  if (!view) {
351  fShape->Draw();
352  fPad->GetView()->ShowAxis();
353  } else {
354  const Double_t *orig = fShape->GetOrigin();
355  view->SetRange(orig[0]-fShape->GetDX(), orig[1]-fShape->GetDY(), orig[2]-fShape->GetDZ(),
356  orig[0]+fShape->GetDX(), orig[1]+fShape->GetDY(), orig[2]+fShape->GetDZ());
357  Update();
358  }
359  } else Update();
360  }
361  return;
362  }
363  // No need to call SetDimensions
364  if (TMath::Abs(phi1-fShape->GetPhi1())>1.e-6) fShape->Phi1() = phi1;
365  if (TMath::Abs(dphi-fShape->GetDphi())>1.e-6) fShape->Dphi() = dphi;
366  for (isect=0; isect<fNsections; isect++) {
367  sect = (TGeoPconSection*)fSections->At(isect);
368  fShape->Z(isect) = sect->GetZ();
369  fShape->Rmin(isect) = sect->GetRmin();
370  fShape->Rmax(isect) = sect->GetRmax();
371  }
372  fShape->ComputeBBox();
373  if (fPad) {
375  TView *view = fPad->GetView();
376  if (!view) {
377  fShape->Draw();
378  fPad->GetView()->ShowAxis();
379  } else {
380  const Double_t *orig = fShape->GetOrigin();
381  view->SetRange(orig[0]-fShape->GetDX(), orig[1]-fShape->GetDY(), orig[2]-fShape->GetDZ(),
382  orig[0]+fShape->GetDX(), orig[1]+fShape->GetDY(), orig[2]+fShape->GetDZ());
383  Update();
384  }
385  } else Update();
386  }
387 }
388 
389 ////////////////////////////////////////////////////////////////////////////////
390 /// Change parameters of section isect;
391 
393 {
394  TGeoPconSection *sect, *sectlo=0, *secthi=0;
395  sect = (TGeoPconSection*)fSections->At(isect);
396  if (isect) sectlo = (TGeoPconSection*)fSections->At(isect-1);
397  if (isect<fNsections-1) secthi = (TGeoPconSection*)fSections->At(isect+1);
398  Double_t z = sect->GetZ();
399  if (sectlo && z<sectlo->GetZ()) {
400  z = sectlo->GetZ();
401  sect->SetZ(z);
402  }
403  if (secthi && z>secthi->GetZ()) {
404  z = secthi->GetZ();
405  sect->SetZ(z);
406  }
407  DoModified();
408  if (!IsDelayed()) DoApply();
409 }
410 
411 ////////////////////////////////////////////////////////////////////////////////
412 /// Change number of sections.
413 
415 {
416  Int_t nz = fENz->GetIntNumber();
417  if (nz < 2) {
418  nz = 2;
419  fENz->SetNumber(nz);
420  }
421  CreateSections(nz);
423  DoModified();
424  if (!IsDelayed()) DoApply();
425 }
426 
427 ////////////////////////////////////////////////////////////////////////////////
428 /// Change phi range.
429 
431 {
432  Double_t phi1 = fEPhi1->GetNumber();
433  Double_t dphi = fEDPhi->GetNumber();
434  if (TMath::Abs(phi1)>360) fEPhi1->SetNumber(0);
435  if (dphi>360) fEDPhi->SetNumber(360);
436  DoModified();
437  if (!IsDelayed()) DoApply();
438 }
439 
440 ////////////////////////////////////////////////////////////////////////////////
441 /// Slot for signaling modifications.
442 
444 {
445  fApply->SetEnabled();
446 }
447 
448 ////////////////////////////////////////////////////////////////////////////////
449 /// Slot for undoing last operation.
450 
452 {
457  TGeoPconSection *sect;
458  for (Int_t isect=0; isect<fNsections; isect++) {
459  sect = (TGeoPconSection*)fSections->At(isect);
460  sect->SetZ(fZi[isect]);
461  sect->SetRmin(fRmini[isect]);
462  sect->SetRmax(fRmaxi[isect]);
463  }
464  DoApply();
467 }
468 
470 
471 ////////////////////////////////////////////////////////////////////////////////
472 /// Constructor.
473 
476 {
477  fNumber = id;
478  TGTextEntry *nef;
479  // Label with number
480  AddFrame(new TGLabel(this, TString::Format("#%i",id)), new TGLayoutHints(kLHintsLeft, 2, 4, 6, 0));
481 
482  // Z entry
483  fEZ = new TGNumberEntry(this, 0., 5);
484  fEZ->Resize(40,fEZ->GetDefaultHeight());
485  nef = (TGTextEntry*)fEZ->GetNumberEntry();
486  nef->SetToolTipText("Enter the Z position");
487  fEZ->Associate(this);
488  AddFrame(fEZ, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
489  // Rmin entry
490  fERmin = new TGNumberEntry(this, 0., 5);
491  fERmin->SetNumAttr(TGNumberFormat::kNEAPositive);
492  fERmin->Resize(40,fERmin->GetDefaultHeight());
493  nef = (TGTextEntry*)fERmin->GetNumberEntry();
494  nef->SetToolTipText("Enter the minimum radius");
495  fERmin->Associate(this);
496  AddFrame(fERmin, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
497  // Rmax entry
498  fERmax = new TGNumberEntry(this, 0., 5);
499  fERmax->SetNumAttr(TGNumberFormat::kNEAPositive);
500  fERmax->Resize(40,fERmax->GetDefaultHeight());
501  nef = (TGTextEntry*)fERmax->GetNumberEntry();
502  nef->SetToolTipText("Enter the maximum radius");
503  fERmax->Associate(this);
504  AddFrame(fERmax, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
505 
506  ConnectSignals2Slots();
507  MapSubwindows();
508  Layout();
509 }
510 
511 ////////////////////////////////////////////////////////////////////////////////
512 /// Destructor
513 
515 {
516  Cleanup();
517 }
518 
519 ////////////////////////////////////////////////////////////////////////////////
520 /// Hide daughter frames
521 
523 {
524  fEZ->UnmapWindow();
525  fERmin->UnmapWindow();
526  fERmax->UnmapWindow();
527 }
528 
529 ////////////////////////////////////////////////////////////////////////////////
530 /// Emit Changed(Int_t) signal.
531 
533 {
534  Emit("Changed(Int_t)", i);
535 }
536 
537 ////////////////////////////////////////////////////////////////////////////////
538 /// Connect signals to slots.
539 
541 {
542  fEZ->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoZ()");
543  fERmin->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmin()");
544  fERmax->Connect("ValueSet(Long_t)", "TGeoPconSection", this, "DoRmax()");
545 }
546 
547 ////////////////////////////////////////////////////////////////////////////////
548 /// Z value getter
549 
551 {
552  return fEZ->GetNumber();
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// Rmin value getter
557 
559 {
560  return fERmin->GetNumber();
561 }
562 
563 ////////////////////////////////////////////////////////////////////////////////
564 /// Rmax value getter
565 
567 {
568  return fERmax->GetNumber();
569 }
570 
571 ////////////////////////////////////////////////////////////////////////////////
572 /// Z value setter
573 
575 {
576  fEZ->SetNumber(z);
577 }
578 
579 ////////////////////////////////////////////////////////////////////////////////
580 /// Rmin value setter
581 
583 {
584  fERmin->SetNumber(rmin);
585 }
586 
587 ////////////////////////////////////////////////////////////////////////////////
588 /// Rmax value setter
589 
591 {
592  fERmax->SetNumber(rmax);
593 }
594 
595 ////////////////////////////////////////////////////////////////////////////////
596 /// Z slot.
597 
599 {
600  Changed(fNumber);
601 }
602 
603 ////////////////////////////////////////////////////////////////////////////////
604 /// Rmin slot.
605 
607 {
608  Double_t rmin = fERmin->GetNumber();
609  Double_t rmax = fERmax->GetNumber();
610  if (rmin>rmax-1.e-8) fERmin->SetNumber(rmax);
611  Changed(fNumber);
612 }
613 
614 ////////////////////////////////////////////////////////////////////////////////
615 /// Rmax slot.
616 
618 {
619  Double_t rmin = fERmin->GetNumber();
620  Double_t rmax = fERmax->GetNumber();
621  if (rmax<rmin+1.e-8) fERmax->SetNumber(rmin);
622  Changed(fNumber);
623 }
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:39
TGCheckButton * fDelayed
virtual void SetDimensions(Double_t *param)
Set polycone dimensions starting from an array.
Definition: TGeoPcon.cxx:1206
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual ~TGeoPconEditor()
Destructor.
virtual Bool_t IsComposite() const
Definition: TGFrame.h:275
virtual void SetModel(TObject *obj)
Connect to a given pcon.
virtual ~TGeoPconSection()
Destructor.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGeoPcon * fShape
virtual void SetName(const char *name)
Change (i.e.
Definition: TNamed.cxx:128
Double_t GetRmin() const
Rmin value getter.
TH1 * h
Definition: legend2.C:5
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:36
Double_t GetZ() const
Z value getter.
virtual void SetContainer(TGFrame *f)
Definition: TGCanvas.h:234
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Double_t & Rmin(Int_t ipl)
Definition: TGeoPcon.h:104
virtual Bool_t IsPaintingShape() const =0
void DoSectionChange(Int_t i)
Change parameters of section isect;.
virtual TList * GetList() const
Definition: TGFrame.h:385
Double_t GetPhi1() const
Definition: TGeoPcon.h:85
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Double_t & Phi1()
Definition: TGeoPcon.h:102
void CreateSections(Int_t inew)
Change dynamically the number of sections.
TGCompositeFrame * fBFrame
virtual Double_t GetDY() const
Definition: TGeoBBox.h:83
Double_t * fRmaxi
virtual Double_t GetDZ() const
Definition: TGeoBBox.h:84
TGNumberEntry * fERmin
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
Double_t * fRmini
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
Double_t GetRmax() const
Rmax value getter.
Double_t & Dphi()
Definition: TGeoPcon.h:103
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1131
ClassImp(TGeoPconEditor) enum ETGeoPconWid
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hirarchically all daughters of a composite frame.
virtual void DoUndo()
Slot for undoing last operation.
void DoRmax()
Rmax slot.
TGNumberEntryField * GetNumberEntry() const
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:2321
ULong_t Pixel_t
Definition: GuiTypes.h:41
void Class()
Definition: Class.C:29
TGCanvas * fCan
const char * GetText() const
Definition: TGTextEntry.h:140
TVirtualGeoPainter * GetPainter() const
Definition: TGeoManager.h:193
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.
TGTextEntry * fShapeName
XFontStruct * id
Definition: TGX11.cxx:108
Float_t z[5]
Definition: Ifit.C:16
void SetRmax(Double_t rmax)
Rmax value setter.
virtual const Double_t * GetOrigin() const
Definition: TGeoBBox.h:85
void Emit(const char *signal)
Acitvate signal without args.
Definition: TQObject.cxx:559
virtual TView * GetView() const =0
Bool_t CheckSections(Bool_t change=kFALSE)
Check validity of sections.
void DoRmin()
Rmin slot.
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:1135
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
void SetZ(Double_t z)
Z value setter.
virtual Double_t GetDX() const
Definition: TGeoBBox.h:82
Double_t GetDphi() const
Definition: TGeoPcon.h:86
void HideDaughters()
Hide daughter frames.
virtual void SetSize(const TGDimension &s)
Definition: TGFrame.h:315
TGNumberEntry * fENz
virtual EButtonState GetState() const
Definition: TGButton.h:116
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:630
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:187
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:90
void DoName()
Perform name change.
unsigned int UInt_t
Definition: RtypesCore.h:42
TGFrame * GetContainer() const
Definition: TGCanvas.h:228
virtual void ComputeBBox()
compute bounding box of the pcon Check if the sections are in increasing Z order
Definition: TGeoPcon.cxx:283
Double_t * GetZ() const
Definition: TGeoPcon.h:93
void UpdateSections()
Update sections according fShape.
void DoZ()
Z slot.
tuple w
Definition: qtexample.py:51
TGFrame * fFrame
Definition: TGLayout.h:125
virtual void ShowAxis()=0
const std::string sname
Definition: testIO.cxx:45
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:247
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
void DoPhi()
Change phi range.
Double_t * GetRmin() const
Definition: TGeoPcon.h:89
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:556
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
TGDimension GetSize() const
Definition: TGFrame.h:293
virtual void ConnectSignals2Slots()
Connect signals to slots.
tuple view
Definition: tornado.py:20
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
TGTextButton * fApply
virtual void UnmapWindow()
Definition: TGFrame.h:269
Double_t & Z(Int_t ipl)
Definition: TGeoPcon.h:106
virtual void Layout()
Create layout for canvas.
Definition: TGCanvas.cxx:2226
Bool_t fInit
Definition: TGedFrame.h:55
RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95)
Double_t * GetRmax() const
Definition: TGeoPcon.h:91
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:254
void SetRmin(Double_t rmin)
Rmin value setter.
TObjArray * fSections
virtual void MapWindow()
Definition: TGFrame.h:267
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
virtual Long_t GetIntNumber() const
void Add(TObject *obj)
Definition: TObjArray.h:75
virtual Double_t GetNumber() const
Double_t & Rmax(Int_t ipl)
Definition: TGeoPcon.h:105
UInt_t GetDefaultHeight() const
TObject * At(Int_t idx) const
Definition: TObjArray.h:167
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...
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TVirtualPad * fPad
Definition: TGeoGedFrame.h:28
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:720
virtual void DoApply()
Slot for applying modifications.
const Bool_t kTRUE
Definition: Rtypes.h:91
TGCompositeFrame * fDFrame
TObject * obj
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:96
Int_t GetNz() const
Definition: TGeoPcon.h:87
virtual void Changed(Int_t i)
Emit Changed(Int_t) signal.
TGViewPort * GetViewPort() const
Definition: TGCanvas.h:229
Double_t * fZi