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