Logo ROOT   6.08/07
Reference Guide
TGeoTrapEditor.h
Go to the documentation of this file.
1 // @(#):$Id$
2 // Author: M.Gheata
3 /*************************************************************************
4  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_TGeoTrapEditor
12 #define ROOT_TGeoTrapEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoTrapEditor //
17 // //
18 // Editor for a TGeoTrap. //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 
22 #ifndef ROOT_TGButton
23 #include "TGWidget.h"
24 #endif
25 #ifndef ROOT_TGeoGedFrame
26 #include "TGeoGedFrame.h"
27 #endif
28 
29 class TGeoTrap;
30 class TGeoTabManager;
31 class TGTextEntry;
32 class TGNumberEntry;
33 class TGTab;
34 class TGComboBox;
35 class TGTextButton;
36 class TGCheckButton;
37 class TString;
38 
39 class TGeoTrapEditor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fH1i; // Initial half length in y at low z
44  Double_t fBl1i; // Initial half length in x at low z and y low edge
45  Double_t fTl1i; // Initial half length in x at low z and y high edge
46  Double_t fDzi; // Initial Dz
47  Double_t fSci; // Initial scale factor for upper face
48  Double_t fAlpha1i; // Initial angle between centers of x edges an y axis at low z
49  Double_t fThetai; // Initial theta
50  Double_t fPhii; // Initial phi
51  TString fNamei; // Initial name
52  TGeoTrap *fShape; // Shape object
53  Bool_t fIsModified; // Flag that volume was modified
54  Bool_t fIsShapeEditable; // Flag that the shape can be changed
55 
56  TGTextEntry *fShapeName; // Shape name text entry
57  TGNumberEntry *fEH1; // Number entry for H1
58  TGNumberEntry *fEBl1; // Number entry for Bl1
59  TGNumberEntry *fETl1; // Number entry for Tl1
60  TGNumberEntry *fESc1; // Number entry for lower scale
61  TGNumberEntry *fESc2; // Number entry for upper scale
62  TGNumberEntry *fEDz; // Number entry for DZ
63  TGNumberEntry *fEAlpha1; // Number entry for Alpha1
64  TGNumberEntry *fETheta; // Number entry for Theta
65  TGNumberEntry *fEPhi ; // Number entry for Theta
66  TGTextButton *fApply; // Apply-Button to accept changes
67  TGTextButton *fUndo; // Undo-Button
68  TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
69  TGCheckButton *fDelayed; // Check button for delayed draw
70  TGCompositeFrame *fDFrame; // Frame containing Delayed draw
71 
72  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
73  Bool_t IsDelayed() const;
74 
75 public:
76  TGeoTrapEditor(const TGWindow *p = 0,
77  Int_t width = 140, Int_t height = 30,
78  UInt_t options = kChildFrame,
80  virtual ~TGeoTrapEditor();
81  virtual void SetModel(TObject *obj);
82 
83  void DoH1();
84  void DoBl1();
85  void DoTl1();
86  void DoDz();
87  void DoSc1();
88  void DoSc2();
89  void DoAlpha1();
90  void DoTheta();
91  void DoPhi();
92  void DoModified();
93  void DoName();
94  virtual void DoApply();
95  virtual void DoUndo();
96 
97  ClassDef(TGeoTrapEditor,0) // TGeoTrap editor
98 };
99 
101 
102 protected:
103 
104  Double_t fTwisti; // Initial twist angle
105  TGNumberEntry *fETwist; // Number entry for H1
106 
107 public:
108  TGeoGtraEditor(const TGWindow *p = 0,
109  Int_t width = 140, Int_t height = 30,
110  UInt_t options = kChildFrame,
112  virtual ~TGeoGtraEditor();
113  virtual void SetModel(TObject *obj);
114 
115  void DoTwist();
116  virtual void DoApply();
117  virtual void DoUndo();
118 
119  ClassDef(TGeoGtraEditor,0) // TGeoGtra editor
120 };
121 
122 #endif
virtual void DoApply()
Slot for applying current settings.
TGTextButton * fUndo
TGNumberEntry * fETheta
virtual void SetModel(TObject *obj)
Connect to the selected object.
Double_t fAlpha1i
TGTextButton * fApply
TGNumberEntry * fEPhi
TGeoTrap * fShape
Definition: TGTab.h:66
TGNumberEntry * fETwist
Basic string class.
Definition: TString.h:137
Double_t fThetai
TGTextEntry * fShapeName
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGNumberEntry * fEBl1
void DoModified()
Slot for notifying modifications.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGCompositeFrame * fDFrame
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void DoName()
Slot for name.
void DoTheta()
Slot for theta.
TGNumberEntry * fESc2
void DoSc1()
Slot for H2.
TRAP is a general trapezoid, i.e.
Definition: TGeoArb8.h:91
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.
void DoTl1()
Slot for Tl1.
TGNumberEntry * fETl1
TGCompositeFrame * fBFrame
Bool_t IsDelayed() const
Check if shape drawing is delayed.
Bool_t fIsShapeEditable
void DoPhi()
Slot for phi.
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void DoUndo()
Slot for undoing last operation.
void DoAlpha1()
Slot for alpha1.
TGNumberEntry * fEDz
void DoSc2()
Slot for H2.
double Double_t
Definition: RtypesCore.h:55
TGNumberEntry * fEAlpha1
virtual ~TGeoTrapEditor()
Destructor.
Mother of all ROOT objects.
Definition: TObject.h:37
TGNumberEntry * fESc1
void DoDz()
Slot for Z.
TGNumberEntry * fEH1
void DoH1()
Slot for H1.
void DoBl1()
Slot for Bl1.
TGCheckButton * fDelayed