Logo ROOT   6.14/05
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 #include "TGWidget.h"
15 #include "TGeoGedFrame.h"
16 
17 class TGeoTube;
18 class TGeoTabManager;
19 class TGTextEntry;
20 class TGNumberEntry;
21 class TGTab;
22 class TGComboBox;
23 class TGTextButton;
24 class TGCheckButton;
25 class TString;
26 
27 class TGeoTubeEditor : public TGeoGedFrame {
28 
29 protected:
30 
31  Double_t fRmini; // Initial inner radius
32  Double_t fRmaxi; // Initial outer radius
33  Double_t fDzi; // Initial box dz
34  TString fNamei; // Initial name
35  TGeoTube *fShape; // Shape object
36  Bool_t fIsModified; // Flag that volume was modified
37  Bool_t fIsShapeEditable; // Flag that the shape can be changed
38 
39  TGTextEntry *fShapeName; // Shape name text entry
40  TGNumberEntry *fERmin; // Number entry for rmin
41  TGNumberEntry *fERmax; // Number entry for rmax
42  TGNumberEntry *fEDz; // Number entry for DZ
43  TGTextButton *fApply; // Apply-Button to accept changes
44  TGTextButton *fUndo; // Undo-Button
45  TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
46  TGCheckButton *fDelayed; // Check button for delayed draw
47  TGCompositeFrame *fDFrame; // Frame containing Delayed draw
48 
49  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
50  Bool_t IsDelayed() const;
51 
52 public:
53  TGeoTubeEditor(const TGWindow *p = 0,
54  Int_t width = 140, Int_t height = 30,
55  UInt_t options = kChildFrame,
57  virtual ~TGeoTubeEditor();
58  virtual void SetModel(TObject *obj);
59 
60  void DoRmin();
61  void DoRmax();
62  void DoDz();
63  void DoModified();
64  void DoName();
65  virtual void DoApply();
66  virtual void DoUndo();
67 
68  ClassDef(TGeoTubeEditor,0) // TGeoTube editor
69 };
70 
71 
72 class TGDoubleVSlider;
73 
75 
76 protected:
77 
78  Bool_t fLock; // Phi lock
79  Double_t fPmini; // Initial phi min
80  Double_t fPmaxi; // Initial phi max
81  TGDoubleVSlider *fSPhi; // Phi slider
82  TGNumberEntry *fEPhi1; // Number entry for phi1
83  TGNumberEntry *fEPhi2; // Number entry for phi2
84 
85  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
86 
87 public:
88  TGeoTubeSegEditor(const TGWindow *p = 0,
89  Int_t width = 140, Int_t height = 30,
90  UInt_t options = kChildFrame,
92  virtual ~TGeoTubeSegEditor();
93  virtual void SetModel(TObject *obj);
94 
95  void DoPhi();
96  void DoPhi1();
97  void DoPhi2();
98  virtual void DoApply();
99  virtual void DoUndo();
100 
101  ClassDef(TGeoTubeSegEditor,0) // TGeoTubeSeg editor
102 };
103 
105 
106 protected:
107  Double_t fThlo; // Theta angle of the normal to the lower plane (90, 180)
108  Double_t fPhlo; // Phi angle of the normal to lower Z plane
109  Double_t fThhi; // Theta angle of the normal to the upper plane (0, 90)
110  Double_t fPhhi; // Phi angle of the normal to upper Z plane
111  TGNumberEntry *fEThlo; // Number entry for thlo
112  TGNumberEntry *fEPhlo; // Number entry for phlo
113  TGNumberEntry *fEThhi; // Number entry for thhi
114  TGNumberEntry *fEPhhi; // Number entry for phhi
115 
116 public:
117  TGeoCtubEditor(const TGWindow *p = 0,
118  Int_t width = 140, Int_t height = 30,
119  UInt_t options = kChildFrame,
121  virtual ~TGeoCtubEditor();
122  virtual void SetModel(TObject *obj);
123 
124  void DoThlo();
125  void DoPhlo();
126  void DoThhi();
127  void DoPhhi();
128  virtual void DoApply();
129  virtual void DoUndo();
130 
131  ClassDef(TGeoCtubEditor,0) // TGeoCtub editor
132 };
133 
134 #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.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
Manager for all editor tabs.
virtual void DoUndo()
Slot for undoing last operation.
Basic string class.
Definition: TString.h:131
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:320
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
Editor for a TGeoTube.
TGCheckButton * fDelayed
void DoRmax()
Slot for rmax.
virtual ~TGeoTubeEditor()
Destructor.
Editor for a TGeoTubeSeg.
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
Editor for a TGeoCtub.
void DoName()
Perform name change.
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
TGNumberEntry * fEPhhi