Logo ROOT   6.10/09
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 #include "TGWidget.h"
23 #include "TGeoGedFrame.h"
24 
25 class TGeoCone;
26 class TGeoConeSeg;
27 class TGeoTabManager;
28 class TGTextEntry;
29 class TGNumberEntry;
30 class TGTab;
31 class TGComboBox;
32 class TGTextButton;
33 class TGCheckButton;
34 class TString;
35 
36 class TGeoConeEditor : public TGeoGedFrame {
37 
38 protected:
39 
40  Double_t fRmini1; // Initial inner radius at -dz
41  Double_t fRmaxi1; // Initial outer radius at -dz
42  Double_t fRmini2; // Initial inner radius at +dz
43  Double_t fRmaxi2; // Initial outer radius at +dz
44  Double_t fDzi; // Initial box dz
45  TString fNamei; // Initial name
46  TGeoCone *fShape; // Shape object
47  Bool_t fIsModified; // Flag that volume was modified
48  Bool_t fIsShapeEditable; // Flag that the shape can be changed
49  TGTextEntry *fShapeName; // Shape name text entry
50  TGNumberEntry *fERmin1; // Number entry for rmin1
51  TGNumberEntry *fERmin2; // Number entry for rmin2
52  TGNumberEntry *fERmax1; // Number entry for rmax1
53  TGNumberEntry *fERmax2; // Number entry for rmax2
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  TGeoConeEditor(const TGWindow *p = 0,
66  Int_t width = 140, Int_t height = 30,
67  UInt_t options = kChildFrame,
69  virtual ~TGeoConeEditor();
70  virtual void SetModel(TObject *obj);
71 
72  void DoRmin1();
73  void DoRmin2();
74  void DoRmax1();
75  void DoRmax2();
76  void DoDz();
77  void DoModified();
78  void DoName();
79  virtual void DoApply();
80  virtual void DoUndo();
81 
82  ClassDef(TGeoConeEditor,0) // TGeoCone editor
83 };
84 
85 //////////////////////////////////////////////////////////////////////////
86 // //
87 // TGeoConeSegEditor //
88 // //
89 // Editor for a cone segment. //
90 // //
91 //////////////////////////////////////////////////////////////////////////
92 
93 class TGDoubleVSlider;
94 
96 
97 protected:
98 
99  Bool_t fLock; // Phi lock
100  Double_t fPmini; // Initial phi min
101  Double_t fPmaxi; // Initial phi max
102  TGDoubleVSlider *fSPhi; // Phi slider
103  TGNumberEntry *fEPhi1; // Number entry for phi1
104  TGNumberEntry *fEPhi2; // Number entry for phi2
105 
106  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
107 
108 public:
109  TGeoConeSegEditor(const TGWindow *p = 0,
110  Int_t width = 140, Int_t height = 30,
111  UInt_t options = kChildFrame,
113  virtual ~TGeoConeSegEditor();
114  virtual void SetModel(TObject *obj);
115 
116  void DoPhi();
117  void DoPhi1();
118  void DoPhi2();
119  virtual void DoApply();
120  virtual void DoUndo();
121 
122  ClassDef(TGeoConeSegEditor,0) // TGeoConeSeg editor
123 };
124 
125 #endif
TGNumberEntry * fEPhi1
TGNumberEntry * fEPhi2
Double_t fRmaxi1
TGNumberEntry * fEDz
Definition: TGTab.h:62
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:129
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:297
ULong_t Pixel_t
Definition: GuiTypes.h:39
A phi segment of a conical tube.
Definition: TGeoCone.h:98
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:17
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.