Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files 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 #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 
30 class TGeoTranslationEditor : public TGeoGedFrame {
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,
55  Pixel_t back = GetDefaultFrameBackground());
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();
64  Bool_t DoParameters();
65  void DoApply();
66  void DoCancel();
67  void DoUndo();
68 
69  ClassDef(TGeoTranslationEditor,0) // TGeoTranslation editor
70 };
71 
72 
73 class TGeoRotationEditor : public TGeoGedFrame {
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,
105  Pixel_t back = GetDefaultFrameBackground());
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();
115  Bool_t DoParameters();
116  void DoApply();
117  void DoCancel();
118  void DoUndo();
119 
120  ClassDef(TGeoRotationEditor,0) // TGeoRotation editor
121 };
122 
123 
124 class TGeoCombiTransEditor : public TGeoGedFrame {
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,
162  Pixel_t back = GetDefaultFrameBackground());
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();
175  Bool_t DoParameters();
176  void DoApply();
177  void DoCancel();
178  void DoUndo();
179 
180  ClassDef(TGeoCombiTransEditor,0) // TGeoCombiTrans editor
181 };
182 
183 #endif