Logo ROOT   6.08/07
Reference Guide
TGeoConeEditor.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_TGeoConeEditor
12 #define ROOT_TGeoConeEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoConeEditor //
17 // //
18 // Editor for a TGeoCone. //
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 TGeoCone;
30 class TGeoConeSeg;
31 class TGeoTabManager;
32 class TGTextEntry;
33 class TGNumberEntry;
34 class TGTab;
35 class TGComboBox;
36 class TGTextButton;
37 class TGCheckButton;
38 class TString;
39 
40 class TGeoConeEditor : public TGeoGedFrame {
41 
42 protected:
43 
44  Double_t fRmini1; // Initial inner radius at -dz
45  Double_t fRmaxi1; // Initial outer radius at -dz
46  Double_t fRmini2; // Initial inner radius at +dz
47  Double_t fRmaxi2; // Initial outer radius at +dz
48  Double_t fDzi; // Initial box dz
49  TString fNamei; // Initial name
50  TGeoCone *fShape; // Shape object
51  Bool_t fIsModified; // Flag that volume was modified
52  Bool_t fIsShapeEditable; // Flag that the shape can be changed
53  TGTextEntry *fShapeName; // Shape name text entry
54  TGNumberEntry *fERmin1; // Number entry for rmin1
55  TGNumberEntry *fERmin2; // Number entry for rmin2
56  TGNumberEntry *fERmax1; // Number entry for rmax1
57  TGNumberEntry *fERmax2; // Number entry for rmax2
58  TGNumberEntry *fEDz; // Number entry for DZ
59  TGTextButton *fApply; // Apply-Button to accept changes
60  TGTextButton *fUndo; // Undo-Button
61  TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
62  TGCheckButton *fDelayed; // Check button for delayed draw
63  TGCompositeFrame *fDFrame; // Frame containing Delayed draw
64 
65  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
66  Bool_t IsDelayed() const;
67 
68 public:
69  TGeoConeEditor(const TGWindow *p = 0,
70  Int_t width = 140, Int_t height = 30,
71  UInt_t options = kChildFrame,
73  virtual ~TGeoConeEditor();
74  virtual void SetModel(TObject *obj);
75 
76  void DoRmin1();
77  void DoRmin2();
78  void DoRmax1();
79  void DoRmax2();
80  void DoDz();
81  void DoModified();
82  void DoName();
83  virtual void DoApply();
84  virtual void DoUndo();
85 
86  ClassDef(TGeoConeEditor,0) // TGeoCone editor
87 };
88 
89 //////////////////////////////////////////////////////////////////////////
90 // //
91 // TGeoConeSegEditor //
92 // //
93 // Editor for a cone segment. //
94 // //
95 //////////////////////////////////////////////////////////////////////////
96 
97 class TGDoubleVSlider;
98 
100 
101 protected:
102 
103  Bool_t fLock; // Phi lock
104  Double_t fPmini; // Initial phi min
105  Double_t fPmaxi; // Initial phi max
106  TGDoubleVSlider *fSPhi; // Phi slider
107  TGNumberEntry *fEPhi1; // Number entry for phi1
108  TGNumberEntry *fEPhi2; // Number entry for phi2
109 
110  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
111 
112 public:
113  TGeoConeSegEditor(const TGWindow *p = 0,
114  Int_t width = 140, Int_t height = 30,
115  UInt_t options = kChildFrame,
117  virtual ~TGeoConeSegEditor();
118  virtual void SetModel(TObject *obj);
119 
120  void DoPhi();
121  void DoPhi1();
122  void DoPhi2();
123  virtual void DoApply();
124  virtual void DoUndo();
125 
126  ClassDef(TGeoConeSegEditor,0) // TGeoConeSeg editor
127 };
128 
129 #endif
TGNumberEntry * fEPhi1
TGNumberEntry * fEPhi2
Double_t fRmaxi1
TGNumberEntry * fEDz
Definition: TGTab.h:66
TGeoConeEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
Double_t fRmini2
void DoModified()
Slot for modifing current parameters.
TGNumberEntry * fERmin1
virtual ~TGeoConeEditor()
Destructor.
Bool_t fIsShapeEditable
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void DoRmin2()
Slot for Rmin2.
TGCheckButton * fDelayed
TGeoCone * fShape
virtual void SetModel(TObject *obj)
Connect to the selected object.
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
A phi segment of a conical tube.
Definition: TGeoCone.h:100
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGNumberEntry * fERmin2
TGDoubleVSlider * fSPhi
void DoRmax1()
Slot for Rmax1.
TGNumberEntry * fERmax1
virtual void DoApply()
Slot for applying current parameters.
virtual void DoUndo()
Slot for undoing current operation.
Double_t fRmaxi2
void DoRmax2()
Slot for Rmax2.
TGTextEntry * fShapeName
unsigned int UInt_t
Definition: RtypesCore.h:42
double Double_t
Definition: RtypesCore.h:55
virtual void ConnectSignals2Slots()
Connect signals to slots.
Conical tube class.
Definition: TGeoCone.h:19
Double_t fRmini1
void DoRmin1()
Slot for Rmin1.
TGCompositeFrame * fDFrame
void DoDz()
Slot for Dz.
Mother of all ROOT objects.
Definition: TObject.h:37
TGNumberEntry * fERmax2
TGCompositeFrame * fBFrame
TGTextButton * fApply
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGTextButton * fUndo
void DoName()
Slot for name.