Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoTrapEditor.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 TGeoTrapEditor
13\ingroup Geometry_builder
14
15Editor for a TGeoTrap.
16
17\image html geom_trap_pic.png
18
19\image html geom_trap_ed.png
20
21*/
22
23#include "TGeoTrapEditor.h"
24#include "TGeoTabManager.h"
25#include "TGeoArb8.h"
26#include "TGeoManager.h"
27#include "TVirtualGeoPainter.h"
28#include "TVirtualPad.h"
29#include "TView.h"
30#include "TGButton.h"
31#include "TGTextEntry.h"
32#include "TGNumberEntry.h"
33#include "TGLabel.h"
34
36
40};
41
42////////////////////////////////////////////////////////////////////////////////
43/// Constructor for para editor
44
46 Int_t height, UInt_t options, Pixel_t back)
47 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
48{
49 fShape = 0;
50 fH1i = fBl1i = fTl1i = fDzi = fAlpha1i = fThetai = fPhii = fSci = 0.0;
51 fNamei = "";
54
55 // TextEntry for shape name
56 MakeTitle("Name");
57 fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kTRAP_NAME);
59 fShapeName->SetToolTipText("Enter the parallelepiped name");
60 fShapeName->Associate(this);
62
63 TGTextEntry *nef;
64 MakeTitle("Dimensions");
65 // Number entry for H1
67 f1->AddFrame(new TGLabel(f1, "DY"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
68 fEH1 = new TGNumberEntry(f1, 0., 5, kTRAP_H1);
72 nef->SetToolTipText("Enter the half length in y at low z");
73 fEH1->Associate(this);
74 f1->AddFrame(fEH1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
75 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
76
77 // Number entry for Bl1
78 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
79 f1->AddFrame(new TGLabel(f1, "DX1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
80 fEBl1 = new TGNumberEntry(f1, 0., 5, kTRAP_BL1);
84 nef->SetToolTipText("Enter the half length in x at low z and y low edge");
85 fEBl1->Associate(this);
86 f1->AddFrame(fEBl1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
87 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
88
89 // Number entry for Tl1
90 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
91 f1->AddFrame(new TGLabel(f1, "DX2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
92 fETl1 = new TGNumberEntry(f1, 0., 5, kTRAP_TL1);
96 nef->SetToolTipText("Enter the half length in x at low z and y high edge");
97 fETl1->Associate(this);
98 f1->AddFrame(fETl1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
99 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
100
101 // Number entry for scale factor
102 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
103 f1->AddFrame(new TGLabel(f1, "SC1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
104 fESc1 = new TGNumberEntry(f1, 0., 5, kTRAP_SC1);
108 nef->SetToolTipText("Enter the scale factor for lower Z face");
109 fESc1->Associate(this);
110 f1->AddFrame(fESc1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
111 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
112
113 // Number entry for scale factor
114 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
115 f1->AddFrame(new TGLabel(f1, "SC2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
116 fESc2 = new TGNumberEntry(f1, 0., 5, kTRAP_SC2);
120 nef->SetToolTipText("Enter the scale factor for upper Z face");
121 fESc2->Associate(this);
122 f1->AddFrame(fESc2, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
123 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
124
125 // Number entry for dz
126 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
127 f1->AddFrame(new TGLabel(f1, "DZ"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
128 fEDz = new TGNumberEntry(f1, 0., 5, kTRAP_DZ);
132 nef->SetToolTipText("Enter the half-length in Z");
133 fEDz->Associate(this);
134 f1->AddFrame(fEDz, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
135 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
136
137 // Number entry for Alpha1
138 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
139 f1->AddFrame(new TGLabel(f1, "ALPHA"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
140 fEAlpha1 = new TGNumberEntry(f1, 0., 5, kTRAP_ALPHA1);
143 nef->SetToolTipText("Enter angle between centers of x edges an y axis at low z");
144 fEAlpha1->Associate(this);
145 f1->AddFrame(fEAlpha1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
146 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
147
148 // Number entry for Theta
149 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
150 f1->AddFrame(new TGLabel(f1, "Theta"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
151 fETheta = new TGNumberEntry(f1, 0., 5, kTRAP_THETA);
155 nef->SetToolTipText("Enter initial theta");
156 fETheta->Associate(this);
157 f1->AddFrame(fETheta, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
158 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
159
160 // Number entry for Phi
161 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
162 f1->AddFrame(new TGLabel(f1, "Phi"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
163 fEPhi = new TGNumberEntry(f1, 0., 5, kTRAP_PHI);
167 nef->SetToolTipText("Enter initial phi");
168 fEPhi->Associate(this);
169 f1->AddFrame(fEPhi, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
170 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
171
172 // Delayed draw
174 fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
176 AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
177
178 // Buttons
180 fApply = new TGTextButton(fBFrame, "Apply");
181 fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
182 fApply->Associate(this);
183 fUndo = new TGTextButton(fBFrame, "Undo");
184 fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight , 2, 2, 4, 4));
185 fUndo->Associate(this);
186 AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
188}
189
190////////////////////////////////////////////////////////////////////////////////
191/// Destructor
192
194{
195 TGFrameElement *el;
196 TIter next(GetList());
197 while ((el = (TGFrameElement *)next())) {
198 if (el->fFrame->IsComposite())
200 }
201 Cleanup();
202}
203
204////////////////////////////////////////////////////////////////////////////////
205/// Connect signals to slots.
206
208{
209 fApply->Connect("Clicked()", "TGeoTrapEditor", this, "DoApply()");
210 fUndo->Connect("Clicked()", "TGeoTrapEditor", this, "DoUndo()");
211 fShapeName->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
212 fEH1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoH1()");
213 fEBl1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoBl1()");
214 fETl1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoTl1()");
215 fEDz->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoDz()");
216 fESc1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoSc1()");
217 fESc2->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoSc2()");
218 fEAlpha1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoAlpha1()");
219 fETheta->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoTheta()");
220 fEPhi->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoPhi()");
221 fEH1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
222 fEBl1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
223 fETl1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
224 fEDz->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
225 fESc1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
226 fESc2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
227 fEAlpha1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
228 fETheta->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
229 fEPhi->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
230 fInit = kFALSE;
231}
232
233////////////////////////////////////////////////////////////////////////////////
234/// Connect to the selected object.
235
237{
238 if (obj == 0 || (obj->IsA()!=TGeoTrap::Class())) {
240 return;
241 }
242 fShape = (TGeoTrap*)obj;
243 fH1i = fShape->GetH1();
244 fBl1i = fShape->GetBl1();
245 fTl1i = fShape->GetTl1();
246 fDzi = fShape->GetDz();
247 Double_t h2i = fShape->GetH2();
248// Double_t bl2i = fShape->GetBl2();
249// Double_t tl2i = fShape->GetTl2();
250 fSci = h2i/fH1i;
253 fPhii = fShape->GetPhi();
254 const char *sname = fShape->GetName();
255 if (!strcmp(sname, fShape->ClassName())) fShapeName->SetText("-no_name");
256 else {
257 fShapeName->SetText(sname);
258 fNamei = sname;
259 }
264 fESc1->SetNumber(1.);
271
273 SetActive();
274}
275
276////////////////////////////////////////////////////////////////////////////////
277/// Check if shape drawing is delayed.
278
280{
281 return (fDelayed->GetState() == kButtonDown);
282}
283
284////////////////////////////////////////////////////////////////////////////////
285/// Slot for name.
286
288{
289 DoModified();
290}
291
292////////////////////////////////////////////////////////////////////////////////
293/// Slot for applying current settings.
294
296{
297 const char *name = fShapeName->GetText();
298 if (strcmp(name,fShape->GetName())) fShape->SetName(name);
299 Double_t sc1 = fESc1->GetNumber();
300 Double_t sc2 = fESc2->GetNumber();
301 Double_t h1 = sc1*fEH1->GetNumber();
302 Double_t bl1 = sc1*fEBl1->GetNumber();
303 Double_t tl1 = sc1*fETl1->GetNumber();
304 Double_t h2 = sc2*fEH1->GetNumber();
305 Double_t bl2 = sc2*fEBl1->GetNumber();
306 Double_t tl2 = sc2*fETl1->GetNumber();
307 Double_t dz = fEDz->GetNumber();
308 Double_t alpha1 = fEAlpha1->GetNumber();
309 Double_t theta = fETheta->GetNumber();
310 Double_t phi = fEPhi->GetNumber();
311 Double_t param[11];
312 param[0] = dz;
313 param[1] = theta;
314 param[2] = phi;
315 param[3] = h1;
316 param[7] = h2;
317 param[4] = bl1;
318 param[8] = bl2;
319 param[5] = tl1;
320 param[9] = tl2;
321 param[6] = alpha1;
322 param[10] = alpha1;
323 fShape->SetDimensions(param);
325 fUndo->SetEnabled();
327 if (fPad) {
329 TView *view = fPad->GetView();
330 if (!view) {
331 fShape->Draw();
332 fPad->GetView()->ShowAxis();
333 } else {
334 view->SetRange(-fShape->GetDX(), -fShape->GetDY(), -fShape->GetDZ(),
335 fShape->GetDX(), fShape->GetDY(), fShape->GetDZ());
336 Update();
337 }
338 } else Update();
339 }
340}
341
342////////////////////////////////////////////////////////////////////////////////
343/// Slot for notifying modifications.
344
346{
348}
349
350////////////////////////////////////////////////////////////////////////////////
351/// Slot for undoing last operation.
352
354{
358 fESc1->SetNumber(1.);
364 DoApply();
367}
368
369////////////////////////////////////////////////////////////////////////////////
370/// Slot for H1.
371
373{
375 if (h1<=0) {
376 h1 = 0.1;
377 fEH1->SetNumber(h1);
378 }
379 DoModified();
380 if (!IsDelayed()) DoApply();
381}
382
383////////////////////////////////////////////////////////////////////////////////
384/// Slot for Bl1.
385
387{
388 Double_t bl1 = fEBl1->GetNumber();
389 if (bl1<=0) {
390 bl1 = 0.1;
391 fEBl1->SetNumber(bl1);
392 }
393 DoModified();
394 if (!IsDelayed()) DoApply();
395}
396
397////////////////////////////////////////////////////////////////////////////////
398/// Slot for Tl1.
399
401{
402 Double_t tl1 = fETl1->GetNumber();
403 if (tl1<=0) {
404 tl1 = 0.1;
405 fETl1->SetNumber(tl1);
406 }
407 DoModified();
408 if (!IsDelayed()) DoApply();
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Slot for Z.
413
415{
416 Double_t dz = fEDz->GetNumber();
417 if (dz<=0) {
418 dz = 0.1;
419 fEDz->SetNumber(dz);
420 }
421 DoModified();
422 if (!IsDelayed()) DoApply();
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Slot for H2.
427
429{
430 Double_t sc1 = fESc1->GetNumber();
431 if (sc1<=0) {
432 sc1 = 0.1;
433 fESc1->SetNumber(sc1);
434 }
435 DoModified();
436 if (!IsDelayed()) DoApply();
437}
438
439////////////////////////////////////////////////////////////////////////////////
440/// Slot for H2.
441
443{
444 Double_t sc2 = fESc2->GetNumber();
445 if (sc2<=0) {
446 sc2 = 0.1;
447 fESc2->SetNumber(sc2);
448 }
449 DoModified();
450 if (!IsDelayed()) DoApply();
451}
452
453////////////////////////////////////////////////////////////////////////////////
454/// Slot for alpha1.
455
457{
458 Double_t alpha1 = fEAlpha1->GetNumber();
459 if (TMath::Abs(alpha1)>=90) {
460 alpha1 = 89.9*TMath::Sign(1.,alpha1);
461 fEAlpha1->SetNumber(alpha1);
462 }
463 DoModified();
464 if (!IsDelayed()) DoApply();
465}
466
467////////////////////////////////////////////////////////////////////////////////
468/// Slot for theta.
469
471{
472 Double_t theta = fETheta->GetNumber();
473 if (theta<0) {
474 theta = 0;
475 fETheta->SetNumber(theta);
476 }
477 if (theta>180) {
478 theta = 180;
479 fETheta->SetNumber(theta);
480 }
481 DoModified();
482 if (!IsDelayed()) DoApply();
483}
484
485////////////////////////////////////////////////////////////////////////////////
486/// Slot for phi.
487
489{
490 Double_t phi = fEPhi->GetNumber();
491 if (phi<0 || phi>360) {
492 phi = 0;
493 fEPhi->SetNumber(phi);
494 }
495 DoModified();
496 if (!IsDelayed()) DoApply();
497}
498
500
504
505/** \class TGeoGtraEditor
506\ingroup Geometry_builder
507
508Editor for a TGeoGtra.
509
510\image html geom_gtra_pic.png
511
512\image html geom_gtra_ed.png
513
514*/
515
516////////////////////////////////////////////////////////////////////////////////
517/// Constructor for gtra editor
518
520 Int_t height, UInt_t options, Pixel_t back)
521 : TGeoTrapEditor(p, width, height, options, back)
522{
523 fTwisti = 0;
524 TGTextEntry *nef;
525 // Number entry for Twist angle
527 f1->AddFrame(new TGLabel(f1, "TWIST"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
528 fETwist = new TGNumberEntry(f1, 0., 5, kGTRA_TWIST);
531 nef->SetToolTipText("Enter twist angle");
532 fETwist->Associate(this);
533 f1->AddFrame(fETwist, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
534 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
537 fETwist->Connect("ValueSet(Long_t)", "TGeoGtraEditor", this, "DoTwist()");
538 nef->Connect("TextChanged(const char *)", "TGeoGtraEditor", this, "DoModified()");
539}
540////////////////////////////////////////////////////////////////////////////////
541/// Destructor
542
544{
545 TGFrameElement *el;
546 TIter next(GetList());
547 while ((el = (TGFrameElement *)next())) {
548 if (el->fFrame->IsComposite())
550 }
551 Cleanup();
552}
553
554////////////////////////////////////////////////////////////////////////////////
555/// Connect to a given twisted trapezoid.
556
558{
559 if (obj == 0 || (obj->IsA()!=TGeoGtra::Class())) {
561 return;
562 }
563 fShape = (TGeoTrap*)obj;
564 fH1i = fShape->GetH1();
565 fBl1i = fShape->GetBl1();
566 fTl1i = fShape->GetTl1();
567 fDzi = fShape->GetDz();
568 Double_t h2i = fShape->GetH2();
569// Double_t bl2i = fShape->GetBl2();
570// Double_t tl2i = fShape->GetTl2();
571 fSci = h2i/fH1i;
574 fPhii = fShape->GetPhi();
575 fTwisti = ((TGeoGtra*)fShape)->GetTwistAngle();
576 const char *sname = fShape->GetName();
577 if (!strcmp(sname, fShape->ClassName())) fShapeName->SetText("-no_name");
578 else {
579 fShapeName->SetText(sname);
580 fNamei = sname;
581 }
586 fESc1->SetNumber(1.);
594
596 SetActive();
597}
598
599////////////////////////////////////////////////////////////////////////////////
600/// Slot for applying current settings.
601
603{
604 const char *name = fShapeName->GetText();
605 if (strcmp(name,fShape->GetName())) fShape->SetName(name);
606 Double_t sc1 = fESc1->GetNumber();
607 Double_t sc2 = fESc2->GetNumber();
608 Double_t h1 = sc1*fEH1->GetNumber();
609 Double_t bl1 = sc1*fEBl1->GetNumber();
610 Double_t tl1 = sc1*fETl1->GetNumber();
611 Double_t h2 = sc2*fEH1->GetNumber();
612 Double_t bl2 = sc2*fEBl1->GetNumber();
613 Double_t tl2 = sc2*fETl1->GetNumber();
614 Double_t dz = fEDz->GetNumber();
615 Double_t alpha1 = fEAlpha1->GetNumber();
616 Double_t theta = fETheta->GetNumber();
617 Double_t phi = fEPhi->GetNumber();
618 Double_t twist = fETwist->GetNumber();
619 Double_t param[12];
620 param[0] = dz;
621 param[1] = theta;
622 param[2] = phi;
623 param[3] = h1;
624 param[7] = h2;
625 param[4] = bl1;
626 param[8] = bl2;
627 param[5] = tl1;
628 param[9] = tl2;
629 param[6] = alpha1;
630 param[10] = alpha1;
631 param[11] = twist;
632 TGeoGtra *shape = (TGeoGtra*)fShape;
633 shape->SetDimensions(param);
634 shape->ComputeBBox();
635 fUndo->SetEnabled();
637 if (fPad) {
639 TView *view = fPad->GetView();
640 if (!view) {
641 fShape->Draw();
642 fPad->GetView()->ShowAxis();
643 } else {
644 view->SetRange(-fShape->GetDX(), -fShape->GetDY(), -fShape->GetDZ(),
645 fShape->GetDX(), fShape->GetDY(), fShape->GetDZ());
646 Update();
647 }
648 } else Update();
649 }
650}
651
652////////////////////////////////////////////////////////////////////////////////
653/// Slot for undoing last operation.
654
656{
660 fESc1->SetNumber(1.);
667 DoApply();
670}
671
672////////////////////////////////////////////////////////////////////////////////
673/// Change the twist angle.
674
676{
677 Double_t twist = fETwist->GetNumber();
678 if (twist<=-180 || twist>=180) {
679 twist = 0.;
680 fETwist->SetNumber(twist);
681 }
682 DoModified();
683 if (!IsDelayed()) DoApply();
684}
@ kSunkenFrame
Definition GuiTypes.h:383
@ kVerticalFrame
Definition GuiTypes.h:381
@ kFixedWidth
Definition GuiTypes.h:387
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
const Bool_t kFALSE
Definition RtypesCore.h:92
double Double_t
Definition RtypesCore.h:59
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassImp(name)
Definition Rtypes.h:364
include TDocParser_001 C image html pict1_TDocParser_001 png width
@ kButtonDown
Definition TGButton.h:54
@ kLHintsRight
Definition TGLayout.h:33
@ kLHintsLeft
Definition TGLayout.h:31
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
ETGeoGtraWid
@ kGTRA_TWIST
ETGeoTrapWid
@ kTRAP_SC1
@ kTRAP_APPLY
@ kTRAP_ALPHA1
@ kTRAP_SC2
@ kTRAP_UNDO
@ kTRAP_H1
@ kTRAP_DZ
@ kTRAP_NAME
@ kTRAP_THETA
@ kTRAP_PHI
@ kTRAP_BL1
@ kTRAP_TL1
virtual EButtonState GetState() const
Definition TGButton.h:112
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition TGButton.cxx:412
virtual TList * GetList() const
Definition TGFrame.h:346
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1102
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:952
TGFrame * fFrame
Definition TGLayout.h:119
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:276
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:215
TGDimension GetSize() const
Definition TGFrame.h:254
virtual Bool_t IsComposite() const
Definition TGFrame.h:236
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:590
virtual void SetNumber(Double_t val)
UInt_t GetDefaultHeight() const
TGNumberEntryField * GetNumberEntry() const
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual Double_t GetNumber() const
const char * GetText() const
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
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.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:82
Bool_t fInit
Definition TGedFrame.h:54
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:96
Double_t GetDz() const
Definition TGeoArb8.h:65
virtual void ComputeBBox()
Computes bounding box for an Arb8 shape.
Definition TGeoArb8.cxx:276
virtual Double_t GetDX() const
Definition TGeoBBox.h:70
virtual Double_t GetDZ() const
Definition TGeoBBox.h:72
virtual Double_t GetDY() const
Definition TGeoBBox.h:71
Common base class for geombuilder editors.
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
TVirtualPad * fPad
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
Editor for a TGeoGtra.
TGNumberEntry * fETwist
virtual void DoUndo()
Slot for undoing last operation.
virtual void SetModel(TObject *obj)
Connect to a given twisted trapezoid.
TGeoGtraEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for gtra editor.
virtual ~TGeoGtraEditor()
Destructor.
void DoTwist()
Change the twist angle.
virtual void DoApply()
Slot for applying current settings.
Gtra is a twisted trapezoid.
Definition TGeoArb8.h:146
virtual void SetDimensions(Double_t *param)
Set all arb8 params in one step.
TVirtualGeoPainter * GetPainter() const
virtual const char * GetName() const
Get the shape name.
virtual void Draw(Option_t *option="")
Draw this shape.
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.
Editor for a TGeoTrap.
TGTextButton * fApply
TGNumberEntry * fEPhi
TGCompositeFrame * fDFrame
TGNumberEntry * fEBl1
void DoTl1()
Slot for Tl1.
void DoSc2()
Slot for H2.
void DoH1()
Slot for H1.
TGCheckButton * fDelayed
TGNumberEntry * fETl1
TGNumberEntry * fEDz
TGeoTrapEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for para editor.
virtual ~TGeoTrapEditor()
Destructor.
Bool_t fIsShapeEditable
virtual void DoUndo()
Slot for undoing last operation.
virtual void SetModel(TObject *obj)
Connect to the selected object.
TGTextEntry * fShapeName
TGNumberEntry * fEH1
void DoPhi()
Slot for phi.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fETheta
void DoName()
Slot for name.
void DoSc1()
Slot for H2.
TGCompositeFrame * fBFrame
void DoAlpha1()
Slot for alpha1.
TGNumberEntry * fESc2
void DoBl1()
Slot for Bl1.
virtual void DoApply()
Slot for applying current settings.
TGNumberEntry * fESc1
void DoDz()
Slot for Z.
void DoTheta()
Slot for theta.
void DoModified()
Slot for notifying modifications.
TGeoTrap * fShape
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGTextButton * fUndo
TGNumberEntry * fEAlpha1
TRAP is a general trapezoid, i.e.
Definition TGeoArb8.h:92
Double_t GetTl1() const
Definition TGeoArb8.h:130
Double_t GetPhi() const
Definition TGeoArb8.h:127
Double_t GetTheta() const
Definition TGeoArb8.h:126
virtual void SetDimensions(Double_t *param)
Set all arb8 params in one step.
Double_t GetAlpha1() const
Definition TGeoArb8.h:131
Double_t GetH1() const
Definition TGeoArb8.h:128
Double_t GetH2() const
Definition TGeoArb8.h:132
Double_t GetBl1() const
Definition TGeoArb8.h:129
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:140
Mother of all ROOT objects.
Definition TObject.h:37
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:130
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:866
See TView3D.
Definition TView.h:25
virtual void ShowAxis()=0
virtual void SetRange(const Double_t *min, const Double_t *max)=0
virtual Bool_t IsPaintingShape() const =0
virtual TView * GetView() const =0
TH1F * h1
Definition legend1.C:5
TF1 * f1
Definition legend1.C:11
T1 Sign(T1 a, T2 b)
Definition TMathBase.h:165
Short_t Abs(Short_t d)
Definition TMathBase.h:120