Logo ROOT   6.12/07
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 #include "TGWidget.h"
17 #include "TGeoGedFrame.h"
18 
19 class TGeoTranslation;
20 class TGeoRotation;
21 class TGeoCombiTrans;
22 class TGTextEntry;
23 class TGNumberEntry;
24 class TGTab;
25 class TGComboBox;
26 class TGTextButton;
27 class TGRadioButton;
28 class TString;
29 
31 
32 protected:
33 
34  Double_t fDxi; // Initial dx
35  Double_t fDyi; // Initial dy
36  Double_t fDzi; // Initial dz
37  TString fNamei; // Initial name
38  TGeoTranslation *fTranslation; // Translation object
39  Bool_t fIsModified; // Flag that this was modified
40  Bool_t fIsEditable; // Flag that this can be changed
41  TGTextEntry *fTransName; // Translation name text entry
42  TGNumberEntry *fTransDx; // Number entry for box DX
43  TGNumberEntry *fTransDy; // Number entry for box DY
44  TGNumberEntry *fTransDz; // Number entry for box DZ
45  TGTextButton *fApply; // Apply-Button to accept changes
46  TGTextButton *fCancel; // Cancel-Button
47  TGTextButton *fUndo; // Undo-Button
48 
49  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
50 
51 public:
52  TGeoTranslationEditor(const TGWindow *p = 0,
53  Int_t width = 140, Int_t height = 30,
54  UInt_t options = kChildFrame,
56  virtual ~TGeoTranslationEditor();
57  virtual void SetModel(TObject *obj);
58 
59  void DoDx();
60  void DoDy();
61  void DoDz();
62  void DoModified();
63  void DoName();
65  void DoApply();
66  void DoCancel();
67  void DoUndo();
68 
69  ClassDef(TGeoTranslationEditor,0) // TGeoTranslation editor
70 };
71 
72 
74 
75 protected:
76 
77  Double_t fPhii; // Initial phi (Euler rotation angle about Z)
78  Double_t fThetai; // Initial theta (Euler rotation angle about new X)
79  Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
80  Double_t fAngleX; // New rotation angle about X
81  Double_t fAngleY; // New rotation angle about Y
82  Double_t fAngleZ; // New rotation angle about Z
83  TString fNamei; // Initial name
84  TGeoRotation *fRotation; // Rotation object
85  Bool_t fIsModified; // Flag that this was modified
86  Bool_t fIsEditable; // Flag that this can be changed
87  TGTextEntry *fRotName; // Translation name text entry
88  TGNumberEntry *fRotPhi; // Number entry for phi angle
89  TGNumberEntry *fRotTheta; // Number entry for theta angle
90  TGNumberEntry *fRotPsi; // Number entry for psi angle
91  TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
92  TGRadioButton *fRotX; // Rotation about X selected
93  TGRadioButton *fRotY; // Rotation about Y selected
94  TGRadioButton *fRotZ; // Rotation about Z selected
95  TGTextButton *fApply; // Apply-Button to accept changes
96  TGTextButton *fCancel; // Cancel-Button
97  TGTextButton *fUndo; // Undo-Button
98 
99  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
100 
101 public:
102  TGeoRotationEditor(const TGWindow *p = 0,
103  Int_t width = 140, Int_t height = 30,
104  UInt_t options = kChildFrame,
106  virtual ~TGeoRotationEditor();
107  virtual void SetModel(TObject *obj);
108 
109  void DoRotPhi();
110  void DoRotTheta();
111  void DoRotPsi();
112  void DoRotAngle();
113  void DoModified();
114  void DoName();
116  void DoApply();
117  void DoCancel();
118  void DoUndo();
119 
120  ClassDef(TGeoRotationEditor,0) // TGeoRotation editor
121 };
122 
123 
125 
126 protected:
127 
128  Double_t fDxi; // Initial dx
129  Double_t fDyi; // Initial dy
130  Double_t fDzi; // Initial dz
131  Double_t fPhii; // Initial phi (Euler rotation angle about Z)
132  Double_t fThetai; // Initial theta (Euler rotation angle about new X)
133  Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
134  Double_t fAngleX; // New rotation angle about X
135  Double_t fAngleY; // New rotation angle about Y
136  Double_t fAngleZ; // New rotation angle about Z
137  TString fNamei; // Initial name
138  TGeoCombiTrans *fCombi; // Combi object
139  Bool_t fIsModified; // Flag that this was modified
140  Bool_t fIsEditable; // Flag that this can be changed
141  TGTextEntry *fRotName; // Translation name text entry
142  TGNumberEntry *fTransDx; // Number entry for box DX
143  TGNumberEntry *fTransDy; // Number entry for box DY
144  TGNumberEntry *fTransDz; // Number entry for box DZ
145  TGNumberEntry *fRotPhi; // Number entry for phi angle
146  TGNumberEntry *fRotTheta; // Number entry for theta angle
147  TGNumberEntry *fRotPsi; // Number entry for psi angle
148  TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
149  TGRadioButton *fRotX; // Rotation about X selected
150  TGRadioButton *fRotY; // Rotation about Y selected
151  TGRadioButton *fRotZ; // Rotation about Z selected
152  TGTextButton *fApply; // Apply-Button to accept changes
153  TGTextButton *fCancel; // Cancel-Button
154  TGTextButton *fUndo; // Undo-Button
155 
156  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
157 
158 public:
159  TGeoCombiTransEditor(const TGWindow *p = 0,
160  Int_t width = 140, Int_t height = 30,
161  UInt_t options = kChildFrame,
163  virtual ~TGeoCombiTransEditor();
164  virtual void SetModel(TObject *obj);
165 
166  void DoDx();
167  void DoDy();
168  void DoDz();
169  void DoRotPhi();
170  void DoRotTheta();
171  void DoRotPsi();
172  void DoRotAngle();
173  void DoModified();
174  void DoName();
176  void DoApply();
177  void DoCancel();
178  void DoUndo();
179 
180  ClassDef(TGeoCombiTransEditor,0) // TGeoCombiTrans editor
181 };
182 
183 #endif
TGTextEntry * fTransName
TGRadioButton * fRotZ
void DoDz()
Slot for dx.
TGTextButton * fCancel
TGNumberEntry * fTransDx
TGTextButton * fUndo
Definition: TGTab.h:62
TGTextEntry * fRotName
void DoApply()
Slot for applying changes.
void DoName()
Slot for name.
TGNumberEntry * fTransDz
Class describing translations.
Definition: TGeoMatrix.h:121
Basic string class.
Definition: TString.h:125
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:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGRadioButton * fRotX
TGeoRotation * fRotation
Editor for a TGeoRotation.
TGNumberEntry * fRotPhi
TGNumberEntry * fRotTheta
TGNumberEntry * fTransDy
TGeoCombiTrans * fCombi
Editor for a TGeoCombiTrans.
void DoUndo()
Slot for undoing last operation.
Class describing rotation + translation.
Definition: TGeoMatrix.h:291
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:174
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
Editor for a TGeoTranslation.
Mother of all ROOT objects.
Definition: TObject.h:37
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
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
virtual ~TGeoTranslationEditor()
Destructor.