Logo ROOT   6.08/07
Reference Guide
TGeoTubeEditor.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_TGeoTubeEditor
12 #define ROOT_TGeoTubeEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoTubeEditor //
17 // //
18 // Editor for a TGeoTube. //
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 TGeoTube;
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 TGeoTubeEditor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fRmini; // Initial inner radius
44  Double_t fRmaxi; // Initial outer radius
45  Double_t fDzi; // Initial box dz
46  TString fNamei; // Initial name
47  TGeoTube *fShape; // Shape object
48  Bool_t fIsModified; // Flag that volume was modified
49  Bool_t fIsShapeEditable; // Flag that the shape can be changed
50 
51  TGTextEntry *fShapeName; // Shape name text entry
52  TGNumberEntry *fERmin; // Number entry for rmin
53  TGNumberEntry *fERmax; // Number entry for rmax
54  TGNumberEntry *fEDz; // Number entry for DZ
55  TGTextButton *fApply; // Apply-Button to accept changes
56  TGTextButton *fUndo; // Undo-Button
57  TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
58  TGCheckButton *fDelayed; // Check button for delayed draw
59  TGCompositeFrame *fDFrame; // Frame containing Delayed draw
60 
61  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
62  Bool_t IsDelayed() const;
63 
64 public:
65  TGeoTubeEditor(const TGWindow *p = 0,
66  Int_t width = 140, Int_t height = 30,
67  UInt_t options = kChildFrame,
69  virtual ~TGeoTubeEditor();
70  virtual void SetModel(TObject *obj);
71 
72  void DoRmin();
73  void DoRmax();
74  void DoDz();
75  void DoModified();
76  void DoName();
77  virtual void DoApply();
78  virtual void DoUndo();
79 
80  ClassDef(TGeoTubeEditor,0) // TGeoTube editor
81 };
82 
83 //////////////////////////////////////////////////////////////////////////
84 // //
85 // TGeoTubeSegEditor //
86 // //
87 // Editor for a tube segment. //
88 // //
89 //////////////////////////////////////////////////////////////////////////
90 
91 class TGDoubleVSlider;
92 
94 
95 protected:
96 
97  Bool_t fLock; // Phi lock
98  Double_t fPmini; // Initial phi min
99  Double_t fPmaxi; // Initial phi max
100  TGDoubleVSlider *fSPhi; // Phi slider
101  TGNumberEntry *fEPhi1; // Number entry for phi1
102  TGNumberEntry *fEPhi2; // Number entry for phi2
103 
104  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
105 
106 public:
107  TGeoTubeSegEditor(const TGWindow *p = 0,
108  Int_t width = 140, Int_t height = 30,
109  UInt_t options = kChildFrame,
111  virtual ~TGeoTubeSegEditor();
112  virtual void SetModel(TObject *obj);
113 
114  void DoPhi();
115  void DoPhi1();
116  void DoPhi2();
117  virtual void DoApply();
118  virtual void DoUndo();
119 
120  ClassDef(TGeoTubeSegEditor,0) // TGeoTubeSeg editor
121 };
122 
123 //////////////////////////////////////////////////////////////////////////
124 // //
125 // TGeoCtubEditor //
126 // //
127 // Editor for a tube segment cut with 2 planes. //
128 // //
129 //////////////////////////////////////////////////////////////////////////
130 
132 
133 protected:
134  Double_t fThlo; // Theta angle of the normal to the lower plane (90, 180)
135  Double_t fPhlo; // Phi angle of the normal to lower Z plane
136  Double_t fThhi; // Theta angle of the normal to the upper plane (0, 90)
137  Double_t fPhhi; // Phi angle of the normal to upper Z plane
138  TGNumberEntry *fEThlo; // Number entry for thlo
139  TGNumberEntry *fEPhlo; // Number entry for phlo
140  TGNumberEntry *fEThhi; // Number entry for thhi
141  TGNumberEntry *fEPhhi; // Number entry for phhi
142 
143 public:
144  TGeoCtubEditor(const TGWindow *p = 0,
145  Int_t width = 140, Int_t height = 30,
146  UInt_t options = kChildFrame,
148  virtual ~TGeoCtubEditor();
149  virtual void SetModel(TObject *obj);
150 
151  void DoThlo();
152  void DoPhlo();
153  void DoThhi();
154  void DoPhhi();
155  virtual void DoApply();
156  virtual void DoUndo();
157 
158  ClassDef(TGeoCtubEditor,0) // TGeoCtub editor
159 };
160 
161 #endif
Bool_t fIsShapeEditable
TGeoTubeEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for tube editor.
Cylindrical tube class.
Definition: TGeoTube.h:19
TGNumberEntry * fEPhi2
TGNumberEntry * fERmax
Definition: TGTab.h:66
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual void DoUndo()
Slot for undoing last operation.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGTextEntry * fShapeName
virtual void DoApply()
Slot for applying modifications.
TGNumberEntry * fEThhi
#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 DoModified()
Slot for signaling modifications.
TGTextButton * fUndo
TGCompositeFrame * fDFrame
unsigned int UInt_t
Definition: RtypesCore.h:42
TGeoTube * fShape
TGNumberEntry * fEPhlo
TGCheckButton * fDelayed
void DoRmax()
Slot for rmax.
virtual ~TGeoTubeEditor()
Destructor.
double Double_t
Definition: RtypesCore.h:55
void DoDz()
Slot for dz.
TGNumberEntry * fEPhi1
TGNumberEntry * fERmin
TGTextButton * fApply
Mother of all ROOT objects.
Definition: TObject.h:37
TGDoubleVSlider * fSPhi
TGNumberEntry * fEDz
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGCompositeFrame * fBFrame
virtual void SetModel(TObject *obj)
Connect to the selected object.
void DoRmin()
Slot for rmin.
TGNumberEntry * fEThlo
void DoName()
Perform name change.
TGNumberEntry * fEPhhi