Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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,
56  Pixel_t back = GetDefaultFrameBackground());
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 
74 class TGeoTubeSegEditor : public TGeoTubeEditor {
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,
91  Pixel_t back = GetDefaultFrameBackground());
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 
104 class TGeoCtubEditor : public TGeoTubeSegEditor {
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,
120  Pixel_t back = GetDefaultFrameBackground());
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