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