Logo ROOT   6.07/09
Reference Guide
TGeoMatrixEditor.h
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 #ifndef ROOT_TGeoTranslationEditor
13 #define ROOT_TGeoTranslationEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TGeoTranslationEditor //
18 // //
19 // Editor for a TGeoTranslation. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGButton
24 #include "TGWidget.h"
25 #endif
26 #ifndef ROOT_TGeoGedFrame
27 #include "TGeoGedFrame.h"
28 #endif
29 
30 class TGeoTranslation;
31 class TGeoRotation;
32 class TGeoCombiTrans;
33 class TGTextEntry;
34 class TGNumberEntry;
35 class TGTab;
36 class TGComboBox;
37 class TGTextButton;
38 class TGRadioButton;
39 class TString;
40 
42 
43 protected:
44 
45  Double_t fDxi; // Initial dx
46  Double_t fDyi; // Initial dy
47  Double_t fDzi; // Initial dz
48  TString fNamei; // Initial name
49  TGeoTranslation *fTranslation; // Translation object
50  Bool_t fIsModified; // Flag that this was modified
51  Bool_t fIsEditable; // Flag that this can be changed
52  TGTextEntry *fTransName; // Translation name text entry
53  TGNumberEntry *fTransDx; // Number entry for box DX
54  TGNumberEntry *fTransDy; // Number entry for box DY
55  TGNumberEntry *fTransDz; // Number entry for box DZ
56  TGTextButton *fApply; // Apply-Button to accept changes
57  TGTextButton *fCancel; // Cancel-Button
58  TGTextButton *fUndo; // Undo-Button
59 
60  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
61 
62 public:
63  TGeoTranslationEditor(const TGWindow *p = 0,
64  Int_t width = 140, Int_t height = 30,
65  UInt_t options = kChildFrame,
67  virtual ~TGeoTranslationEditor();
68  virtual void SetModel(TObject *obj);
69 
70  void DoDx();
71  void DoDy();
72  void DoDz();
73  void DoModified();
74  void DoName();
76  void DoApply();
77  void DoCancel();
78  void DoUndo();
79 
80  ClassDef(TGeoTranslationEditor,0) // TGeoTranslation editor
81 };
82 
83 //////////////////////////////////////////////////////////////////////////
84 // //
85 // TGeoRotationEditor //
86 // //
87 // Editor for a TGeoRotation. //
88 // //
89 //////////////////////////////////////////////////////////////////////////
90 
92 
93 protected:
94 
95  Double_t fPhii; // Initial phi (Euler rotation angle about Z)
96  Double_t fThetai; // Initial theta (Euler rotation angle about new X)
97  Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
98  Double_t fAngleX; // New rotation angle about X
99  Double_t fAngleY; // New rotation angle about Y
100  Double_t fAngleZ; // New rotation angle about Z
101  TString fNamei; // Initial name
102  TGeoRotation *fRotation; // Rotation object
103  Bool_t fIsModified; // Flag that this was modified
104  Bool_t fIsEditable; // Flag that this can be changed
105  TGTextEntry *fRotName; // Translation name text entry
106  TGNumberEntry *fRotPhi; // Number entry for phi angle
107  TGNumberEntry *fRotTheta; // Number entry for theta angle
108  TGNumberEntry *fRotPsi; // Number entry for psi angle
109  TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
110  TGRadioButton *fRotX; // Rotation about X selected
111  TGRadioButton *fRotY; // Rotation about Y selected
112  TGRadioButton *fRotZ; // Rotation about Z selected
113  TGTextButton *fApply; // Apply-Button to accept changes
114  TGTextButton *fCancel; // Cancel-Button
115  TGTextButton *fUndo; // Undo-Button
116 
117  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
118 
119 public:
120  TGeoRotationEditor(const TGWindow *p = 0,
121  Int_t width = 140, Int_t height = 30,
122  UInt_t options = kChildFrame,
124  virtual ~TGeoRotationEditor();
125  virtual void SetModel(TObject *obj);
126 
127  void DoRotPhi();
128  void DoRotTheta();
129  void DoRotPsi();
130  void DoRotAngle();
131  void DoModified();
132  void DoName();
134  void DoApply();
135  void DoCancel();
136  void DoUndo();
137 
138  ClassDef(TGeoRotationEditor,0) // TGeoRotation editor
139 };
140 
141 //////////////////////////////////////////////////////////////////////////
142 // //
143 // TGeoCombiTransEditor //
144 // //
145 // Editor for a TGeoCombiTrans. //
146 // //
147 //////////////////////////////////////////////////////////////////////////
148 
150 
151 protected:
152 
153  Double_t fDxi; // Initial dx
154  Double_t fDyi; // Initial dy
155  Double_t fDzi; // Initial dz
156  Double_t fPhii; // Initial phi (Euler rotation angle about Z)
157  Double_t fThetai; // Initial theta (Euler rotation angle about new X)
158  Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
159  Double_t fAngleX; // New rotation angle about X
160  Double_t fAngleY; // New rotation angle about Y
161  Double_t fAngleZ; // New rotation angle about Z
162  TString fNamei; // Initial name
163  TGeoCombiTrans *fCombi; // Combi object
164  Bool_t fIsModified; // Flag that this was modified
165  Bool_t fIsEditable; // Flag that this can be changed
166  TGTextEntry *fRotName; // Translation name text entry
167  TGNumberEntry *fTransDx; // Number entry for box DX
168  TGNumberEntry *fTransDy; // Number entry for box DY
169  TGNumberEntry *fTransDz; // Number entry for box DZ
170  TGNumberEntry *fRotPhi; // Number entry for phi angle
171  TGNumberEntry *fRotTheta; // Number entry for theta angle
172  TGNumberEntry *fRotPsi; // Number entry for psi angle
173  TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
174  TGRadioButton *fRotX; // Rotation about X selected
175  TGRadioButton *fRotY; // Rotation about Y selected
176  TGRadioButton *fRotZ; // Rotation about Z selected
177  TGTextButton *fApply; // Apply-Button to accept changes
178  TGTextButton *fCancel; // Cancel-Button
179  TGTextButton *fUndo; // Undo-Button
180 
181  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
182 
183 public:
184  TGeoCombiTransEditor(const TGWindow *p = 0,
185  Int_t width = 140, Int_t height = 30,
186  UInt_t options = kChildFrame,
188  virtual ~TGeoCombiTransEditor();
189  virtual void SetModel(TObject *obj);
190 
191  void DoDx();
192  void DoDy();
193  void DoDz();
194  void DoRotPhi();
195  void DoRotTheta();
196  void DoRotPsi();
197  void DoRotAngle();
198  void DoModified();
199  void DoName();
201  void DoApply();
202  void DoCancel();
203  void DoUndo();
204 
205  ClassDef(TGeoCombiTransEditor,0) // TGeoCombiTrans editor
206 };
207 
208 #endif
TGTextEntry * fTransName
TGRadioButton * fRotZ
void DoDz()
Slot for dx.
TGTextButton * fCancel
TGNumberEntry * fTransDx
TGTextButton * fUndo
Definition: TGTab.h:66
TGTextEntry * fRotName
void DoApply()
Slot for applying changes.
void DoName()
Slot for name.
TGNumberEntry * fTransDz
Class describing translations.
Definition: TGeoMatrix.h:131
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGTextButton * fCancel
TGRadioButton * fRotZ
TGNumberEntry * fRotTheta
TGNumberEntry * fRotAxis
TGRadioButton * fRotX
virtual void SetModel(TObject *obj)
Connect to the new matrix.
#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
TGRadioButton * fRotX
TGeoRotation * fRotation
TGNumberEntry * fRotPhi
TGNumberEntry * fRotTheta
TGNumberEntry * fTransDy
TGeoCombiTrans * fCombi
void DoUndo()
Slot for undoing last operation.
Class describing rotation + translation.
Definition: TGeoMatrix.h:285
TGNumberEntry * fRotPsi
TGTextButton * fCancel
void DoCancel()
Slot for cancelling last modifications non-applied.
unsigned int UInt_t
Definition: RtypesCore.h:42
TGNumberEntry * fRotAxis
TGTextButton * fApply
Class describing rotations.
Definition: TGeoMatrix.h:180
TGNumberEntry * fRotPsi
double Double_t
Definition: RtypesCore.h:55
TGNumberEntry * fTransDz
void DoModified()
Slot for notifying changes.
void DoDy()
Slot for dx.
TGRadioButton * fRotY
TGNumberEntry * fRotPhi
Mother of all ROOT objects.
Definition: TObject.h:44
void DoDx()
Slot for dx.
TGNumberEntry * fTransDy
Bool_t DoParameters()
Slot for checking parameters.
TGeoTranslationEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for translation editor.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fTransDx
TGeoTranslation * fTranslation
TGRadioButton * fRotY
virtual ~TGeoTranslationEditor()
Destructor.