Logo ROOT   6.08/07
Reference Guide
TGeoTorusEditor.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_TGeoTorusEditor
12 #define ROOT_TGeoTorusEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoTorusEditor //
17 // //
18 // Editor for a TGeoTorus. //
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 TGeoTorus;
30 class TGeoTabManager;
31 class TGTextEntry;
32 class TGNumberEntry;
33 class TGTab;
34 class TGComboBox;
35 class TGTextButton;
36 class TGCheckButton;
37 class TString;
38 
39 class TGeoTorusEditor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fRi; // Initial axial radius
44  Double_t fRmini; // Initial inner radius
45  Double_t fRmaxi; // Initial outer radius
46  Double_t fPhi1i; // Initial starting phi1
47  Double_t fDphii; // Initial phi extent
48  TString fNamei; // Initial name
49  TGeoTorus *fShape; // Shape object
50  Bool_t fIsModified; // Flag that volume was modified
51  Bool_t fIsShapeEditable; // Flag that the shape can be changed
52 
53  TGTextEntry *fShapeName; // Shape name text entry
54  TGNumberEntry *fER; // Number entry for R
55  TGNumberEntry *fERmin; // Number entry for Rmin
56  TGNumberEntry *fERmax; // Number entry for Rmax
57  TGNumberEntry *fEPhi1; // Number entry for phi1
58  TGNumberEntry *fEDphi; // Number entry for Dphi
59  TGTextButton *fApply; // Apply-Button to accept changes
60  TGTextButton *fUndo; // Undo-Button
61  TGCheckButton *fDelayed; // Check button for delayed draw
62 
63  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
64  Bool_t IsDelayed() const;
65 
66 public:
67  TGeoTorusEditor(const TGWindow *p = 0,
68  Int_t width = 140, Int_t height = 30,
69  UInt_t options = kChildFrame,
71  virtual ~TGeoTorusEditor();
72  virtual void SetModel(TObject *obj);
73 
74  void DoR();
75  void DoRmin();
76  void DoRmax();
77  void DoPhi1();
78  void DoDphi();
79  void DoModified();
80  void DoName();
81  void DoApply();
82  void DoUndo();
83 
84  ClassDef(TGeoTorusEditor,0) // TGeoTorus editor
85 };
86 
87 #endif
TGCheckButton * fDelayed
TGTextButton * fApply
void DoDphi()
Slot for Dphi.
void DoApply()
Slot for applying current settings.
void DoUndo()
Slot for undoing last operation.
Definition: TGTab.h:66
Torus segment class.
Definition: TGeoTorus.h:19
Basic string class.
Definition: TString.h:137
TGNumberEntry * fERmin
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGeoTorusEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for torus editor.
TGNumberEntry * fEPhi1
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fERmax
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void DoR()
Slot for R.
void DoModified()
Slot for notifying modifications.
virtual ~TGeoTorusEditor()
Destructor.
TGeoTorus * fShape
void DoPhi1()
Slot for phi.
void DoRmin()
Slot for Rmin.
TGNumberEntry * fER
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGTextButton * fUndo
unsigned int UInt_t
Definition: RtypesCore.h:42
double Double_t
Definition: RtypesCore.h:55
virtual void SetModel(TObject *obj)
Connect to the selected object.
Mother of all ROOT objects.
Definition: TObject.h:37
TGNumberEntry * fEDphi
void DoRmax()
Slot for Rmax.
TGTextEntry * fShapeName
void DoName()
Slot for name.