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
35
50
51////////////////////////////////////////////////////////////////////////////////
52/// Constructor for para editor
53
55 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
56{
57 fShape = nullptr;
58 fH1i = fBl1i = fTl1i = fDzi = fAlpha1i = fThetai = fPhii = fSci = 0.0;
59 fNamei = "";
62
63 // TextEntry for shape name
64 MakeTitle("Name");
65 fShapeName = new TGTextEntry(this, new TGTextBuffer(50), kTRAP_NAME);
67 fShapeName->SetToolTipText("Enter the parallelepiped name");
68 fShapeName->Associate(this);
70
72 MakeTitle("Dimensions");
73 // Number entry for H1
75 f1->AddFrame(new TGLabel(f1, "DY"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
76 fEH1 = new TGNumberEntry(f1, 0., 5, kTRAP_H1);
80 nef->SetToolTipText("Enter the half length in y at low z");
81 fEH1->Associate(this);
82 f1->AddFrame(fEH1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
83 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
84
85 // Number entry for Bl1
86 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
87 f1->AddFrame(new TGLabel(f1, "DX1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
88 fEBl1 = new TGNumberEntry(f1, 0., 5, kTRAP_BL1);
92 nef->SetToolTipText("Enter the half length in x at low z and y low edge");
93 fEBl1->Associate(this);
94 f1->AddFrame(fEBl1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
95 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
96
97 // Number entry for Tl1
98 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
99 f1->AddFrame(new TGLabel(f1, "DX2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
100 fETl1 = new TGNumberEntry(f1, 0., 5, kTRAP_TL1);
104 nef->SetToolTipText("Enter the half length in x at low z and y high edge");
105 fETl1->Associate(this);
106 f1->AddFrame(fETl1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
107 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
108
109 // Number entry for scale factor
110 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
111 f1->AddFrame(new TGLabel(f1, "SC1"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
112 fESc1 = new TGNumberEntry(f1, 0., 5, kTRAP_SC1);
116 nef->SetToolTipText("Enter the scale factor for lower Z face");
117 fESc1->Associate(this);
118 f1->AddFrame(fESc1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
119 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
120
121 // Number entry for scale factor
122 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
123 f1->AddFrame(new TGLabel(f1, "SC2"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
124 fESc2 = new TGNumberEntry(f1, 0., 5, kTRAP_SC2);
128 nef->SetToolTipText("Enter the scale factor for upper Z face");
129 fESc2->Associate(this);
130 f1->AddFrame(fESc2, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
131 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
132
133 // Number entry for dz
134 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
135 f1->AddFrame(new TGLabel(f1, "DZ"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
136 fEDz = new TGNumberEntry(f1, 0., 5, kTRAP_DZ);
140 nef->SetToolTipText("Enter the half-length in Z");
141 fEDz->Associate(this);
142 f1->AddFrame(fEDz, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
143 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
144
145 // Number entry for Alpha1
146 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
147 f1->AddFrame(new TGLabel(f1, "ALPHA"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
148 fEAlpha1 = new TGNumberEntry(f1, 0., 5, kTRAP_ALPHA1);
151 nef->SetToolTipText("Enter angle between centers of x edges an y axis at low z");
152 fEAlpha1->Associate(this);
153 f1->AddFrame(fEAlpha1, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
154 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
155
156 // Number entry for Theta
157 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
158 f1->AddFrame(new TGLabel(f1, "Theta"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
159 fETheta = new TGNumberEntry(f1, 0., 5, kTRAP_THETA);
163 nef->SetToolTipText("Enter initial theta");
164 fETheta->Associate(this);
165 f1->AddFrame(fETheta, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
166 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
167
168 // Number entry for Phi
169 f1 = new TGCompositeFrame(this, 155, 10, kHorizontalFrame | kFixedWidth);
170 f1->AddFrame(new TGLabel(f1, "Phi"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
171 fEPhi = new TGNumberEntry(f1, 0., 5, kTRAP_PHI);
175 nef->SetToolTipText("Enter initial phi");
176 fEPhi->Associate(this);
177 f1->AddFrame(fEPhi, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
178 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
179
180 // Delayed draw
182 fDelayed = new TGCheckButton(fDFrame, "Delayed draw");
184 AddFrame(fDFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
185
186 // Buttons
188 fApply = new TGTextButton(fBFrame, "Apply");
189 fBFrame->AddFrame(fApply, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
190 fApply->Associate(this);
191 fUndo = new TGTextButton(fBFrame, "Undo");
192 fBFrame->AddFrame(fUndo, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
193 fUndo->Associate(this);
194 AddFrame(fBFrame, new TGLayoutHints(kLHintsLeft, 6, 6, 4, 4));
196}
197
198////////////////////////////////////////////////////////////////////////////////
199/// Destructor
200
202{
204 TIter next(GetList());
205 while ((el = (TGFrameElement *)next())) {
206 if (el->fFrame->IsComposite())
208 }
209 Cleanup();
210}
211
212////////////////////////////////////////////////////////////////////////////////
213/// Connect signals to slots.
214
216{
217 fApply->Connect("Clicked()", "TGeoTrapEditor", this, "DoApply()");
218 fUndo->Connect("Clicked()", "TGeoTrapEditor", this, "DoUndo()");
219 fShapeName->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
220 fEH1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoH1()");
221 fEBl1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoBl1()");
222 fETl1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoTl1()");
223 fEDz->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoDz()");
224 fESc1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoSc1()");
225 fESc2->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoSc2()");
226 fEAlpha1->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoAlpha1()");
227 fETheta->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoTheta()");
228 fEPhi->Connect("ValueSet(Long_t)", "TGeoTrapEditor", this, "DoPhi()");
229 fEH1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
230 fEBl1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
231 fETl1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
232 fEDz->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
233 fESc1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
234 fESc2->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
235 fEAlpha1->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
236 fETheta->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
237 fEPhi->GetNumberEntry()->Connect("TextChanged(const char *)", "TGeoTrapEditor", this, "DoModified()");
238 fInit = kFALSE;
239}
240
241////////////////////////////////////////////////////////////////////////////////
242/// Connect to the selected object.
243
245{
246 if (obj == nullptr || (obj->IsA() != TGeoTrap::Class())) {
248 return;
249 }
250 fShape = (TGeoTrap *)obj;
251 fH1i = fShape->GetH1();
252 fBl1i = fShape->GetBl1();
253 fTl1i = fShape->GetTl1();
254 fDzi = fShape->GetDz();
256 // Double_t bl2i = fShape->GetBl2();
257 // Double_t tl2i = fShape->GetTl2();
258 fSci = h2i / fH1i;
261 fPhii = fShape->GetPhi();
262 const char *sname = fShape->GetName();
263 if (!strcmp(sname, fShape->ClassName()))
264 fShapeName->SetText("-no_name");
265 else {
267 fNamei = sname;
268 }
273 fESc1->SetNumber(1.);
280
281 if (fInit)
283 SetActive();
284}
285
286////////////////////////////////////////////////////////////////////////////////
287/// Check if shape drawing is delayed.
288
290{
291 return (fDelayed->GetState() == kButtonDown);
292}
293
294////////////////////////////////////////////////////////////////////////////////
295/// Slot for name.
296
298{
299 DoModified();
300}
301
302////////////////////////////////////////////////////////////////////////////////
303/// Slot for applying current settings.
304
306{
307 const char *name = fShapeName->GetText();
308 if (strcmp(name, fShape->GetName()))
315 Double_t h2 = sc2 * fEH1->GetNumber();
320 Double_t theta = fETheta->GetNumber();
321 Double_t phi = fEPhi->GetNumber();
322 Double_t param[11];
323 param[0] = dz;
324 param[1] = theta;
325 param[2] = phi;
326 param[3] = h1;
327 param[7] = h2;
328 param[4] = bl1;
329 param[8] = bl2;
330 param[5] = tl1;
331 param[9] = tl2;
332 param[6] = alpha1;
333 param[10] = alpha1;
334 fShape->SetDimensions(param);
336 fUndo->SetEnabled();
338 if (fPad) {
340 TView *view = fPad->GetView();
341 if (!view) {
342 fShape->Draw();
343 fPad->GetView()->ShowAxis();
344 } else {
345 view->SetRange(-fShape->GetDX(), -fShape->GetDY(), -fShape->GetDZ(), fShape->GetDX(), fShape->GetDY(),
346 fShape->GetDZ());
347 Update();
348 }
349 } else
350 Update();
351 }
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Slot for notifying modifications.
356
361
362////////////////////////////////////////////////////////////////////////////////
363/// Slot for undoing last operation.
364
380
381////////////////////////////////////////////////////////////////////////////////
382/// Slot for H1.
383
385{
387 if (h1 <= 0) {
388 h1 = 0.1;
389 fEH1->SetNumber(h1);
390 }
391 DoModified();
392 if (!IsDelayed())
393 DoApply();
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Slot for Bl1.
398
400{
402 if (bl1 <= 0) {
403 bl1 = 0.1;
405 }
406 DoModified();
407 if (!IsDelayed())
408 DoApply();
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Slot for Tl1.
413
415{
417 if (tl1 <= 0) {
418 tl1 = 0.1;
420 }
421 DoModified();
422 if (!IsDelayed())
423 DoApply();
424}
425
426////////////////////////////////////////////////////////////////////////////////
427/// Slot for Z.
428
430{
432 if (dz <= 0) {
433 dz = 0.1;
434 fEDz->SetNumber(dz);
435 }
436 DoModified();
437 if (!IsDelayed())
438 DoApply();
439}
440
441////////////////////////////////////////////////////////////////////////////////
442/// Slot for H2.
443
445{
447 if (sc1 <= 0) {
448 sc1 = 0.1;
450 }
451 DoModified();
452 if (!IsDelayed())
453 DoApply();
454}
455
456////////////////////////////////////////////////////////////////////////////////
457/// Slot for H2.
458
460{
462 if (sc2 <= 0) {
463 sc2 = 0.1;
465 }
466 DoModified();
467 if (!IsDelayed())
468 DoApply();
469}
470
471////////////////////////////////////////////////////////////////////////////////
472/// Slot for alpha1.
473
475{
477 if (TMath::Abs(alpha1) >= 90) {
478 alpha1 = 89.9 * TMath::Sign(1., alpha1);
480 }
481 DoModified();
482 if (!IsDelayed())
483 DoApply();
484}
485
486////////////////////////////////////////////////////////////////////////////////
487/// Slot for theta.
488
490{
491 Double_t theta = fETheta->GetNumber();
492 if (theta < 0) {
493 theta = 0;
494 fETheta->SetNumber(theta);
495 }
496 if (theta > 180) {
497 theta = 180;
498 fETheta->SetNumber(theta);
499 }
500 DoModified();
501 if (!IsDelayed())
502 DoApply();
503}
504
505////////////////////////////////////////////////////////////////////////////////
506/// Slot for phi.
507
509{
510 Double_t phi = fEPhi->GetNumber();
511 if (phi < 0 || phi > 360) {
512 phi = 0;
513 fEPhi->SetNumber(phi);
514 }
515 DoModified();
516 if (!IsDelayed())
517 DoApply();
518}
519
520
522
523/** \class TGeoGtraEditor
524\ingroup Geometry_builder
525
526Editor for a TGeoGtra.
527
528\image html geom_gtra_pic.png
529
530\image html geom_gtra_ed.png
531
532*/
533
534////////////////////////////////////////////////////////////////////////////////
535/// Constructor for gtra editor
536
538 : TGeoTrapEditor(p, width, height, options, back)
539{
540 fTwisti = 0;
542 // Number entry for Twist angle
544 f1->AddFrame(new TGLabel(f1, "TWIST"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
545 fETwist = new TGNumberEntry(f1, 0., 5, kGTRA_TWIST);
548 nef->SetToolTipText("Enter twist angle");
549 fETwist->Associate(this);
550 f1->AddFrame(fETwist, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
551 AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
554 fETwist->Connect("ValueSet(Long_t)", "TGeoGtraEditor", this, "DoTwist()");
555 nef->Connect("TextChanged(const char *)", "TGeoGtraEditor", this, "DoModified()");
556}
557////////////////////////////////////////////////////////////////////////////////
558/// Destructor
559
561{
563 TIter next(GetList());
564 while ((el = (TGFrameElement *)next())) {
565 if (el->fFrame->IsComposite())
567 }
568 Cleanup();
569}
570
571////////////////////////////////////////////////////////////////////////////////
572/// Connect to a given twisted trapezoid.
573
575{
576 if (obj == nullptr || (obj->IsA() != TGeoGtra::Class())) {
578 return;
579 }
580 fShape = (TGeoTrap *)obj;
581 fH1i = fShape->GetH1();
582 fBl1i = fShape->GetBl1();
583 fTl1i = fShape->GetTl1();
584 fDzi = fShape->GetDz();
586 // Double_t bl2i = fShape->GetBl2();
587 // Double_t tl2i = fShape->GetTl2();
588 fSci = h2i / fH1i;
591 fPhii = fShape->GetPhi();
592 fTwisti = ((TGeoGtra *)fShape)->GetTwistAngle();
593 const char *sname = fShape->GetName();
594 if (!strcmp(sname, fShape->ClassName()))
595 fShapeName->SetText("-no_name");
596 else {
598 fNamei = sname;
599 }
604 fESc1->SetNumber(1.);
612
613 if (fInit)
615 SetActive();
616}
617
618////////////////////////////////////////////////////////////////////////////////
619/// Slot for applying current settings.
620
622{
623 const char *name = fShapeName->GetText();
624 if (strcmp(name, fShape->GetName()))
631 Double_t h2 = sc2 * fEH1->GetNumber();
636 Double_t theta = fETheta->GetNumber();
637 Double_t phi = fEPhi->GetNumber();
639 Double_t param[12];
640 param[0] = dz;
641 param[1] = theta;
642 param[2] = phi;
643 param[3] = h1;
644 param[7] = h2;
645 param[4] = bl1;
646 param[8] = bl2;
647 param[5] = tl1;
648 param[9] = tl2;
649 param[6] = alpha1;
650 param[10] = alpha1;
651 param[11] = twist;
652 TGeoGtra *shape = (TGeoGtra *)fShape;
653 shape->SetDimensions(param);
654 shape->ComputeBBox();
655 fUndo->SetEnabled();
657 if (fPad) {
659 TView *view = fPad->GetView();
660 if (!view) {
661 fShape->Draw();
662 fPad->GetView()->ShowAxis();
663 } else {
664 view->SetRange(-fShape->GetDX(), -fShape->GetDY(), -fShape->GetDZ(), fShape->GetDX(), fShape->GetDY(),
665 fShape->GetDZ());
666 Update();
667 }
668 } else
669 Update();
670 }
671}
672
673////////////////////////////////////////////////////////////////////////////////
674/// Slot for undoing last operation.
675
692
693////////////////////////////////////////////////////////////////////////////////
694/// Change the twist angle.
695
697{
699 if (twist <= -180 || twist >= 180) {
700 twist = 0.;
702 }
703 DoModified();
704 if (!IsDelayed())
705 DoApply();
706}
@ 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
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kButtonDown
Definition TGButton.h:54
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsLeft
Definition TGLayout.h:24
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
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:453
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
virtual TList * GetList() const
Definition TGFrame.h:312
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:959
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void SetSize(const TGDimension &s)
Definition TGFrame.h:254
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:193
TGDimension GetSize() const
Definition TGFrame.h:232
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
void Associate(const TGWindow *w) override
Make w the window that will receive the generated messages.
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
UInt_t GetDefaultHeight() const override
@ kNEAPositive
Positive number.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
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:72
ROOT GUI Window base class.
Definition TGWindow.h:23
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
Double_t GetDz() const
Definition TGeoArb8.h:68
void ComputeBBox() override
Computes bounding box for an Arb8 shape.
Definition TGeoArb8.cxx:266
virtual Double_t GetDX() const
Definition TGeoBBox.h:76
virtual Double_t GetDZ() const
Definition TGeoBBox.h:78
virtual Double_t GetDY() const
Definition TGeoBBox.h:77
Common base class for geombuilder editors.
void Update() override
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.
TGNumberEntry * fETwist
~TGeoGtraEditor() override
Destructor.
void SetModel(TObject *obj) override
Connect to a given twisted trapezoid.
void DoUndo() override
Slot for undoing last operation.
void DoApply() override
Slot for applying current settings.
TGeoGtraEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for gtra editor.
void DoTwist()
Change the twist angle.
A twisted trapezoid.
Definition TGeoArb8.h:151
void SetDimensions(Double_t *param) override
Set all arb8 params in one step.
static TClass * Class()
TVirtualGeoPainter * GetPainter() const
void Draw(Option_t *option="") override
Draw this shape.
const char * GetName() const override
Get the shape name.
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=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for para editor.
void SetModel(TObject *obj) override
Connect to the selected object.
Bool_t fIsShapeEditable
virtual void DoUndo()
Slot for undoing last operation.
~TGeoTrapEditor() override
Destructor.
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
A general trapezoid.
Definition TGeoArb8.h:98
static TClass * Class()
Double_t GetTl1() const
Definition TGeoArb8.h:136
Double_t GetPhi() const
Definition TGeoArb8.h:133
void SetDimensions(Double_t *param) override
Set all arb8 params in one step.
Double_t GetTheta() const
Definition TGeoArb8.h:132
Double_t GetAlpha1() const
Definition TGeoArb8.h:137
Double_t GetH1() const
Definition TGeoArb8.h:134
Double_t GetH2() const
Definition TGeoArb8.h:138
Double_t GetBl1() const
Definition TGeoArb8.h:135
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:226
virtual TClass * IsA() const
Definition TObject.h:246
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:865
See TView3D.
Definition TView.h:25
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)
Returns a value with the magnitude of a and the sign of b.
Definition TMathBase.h:176
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:124