Logo ROOT   6.08/07
Reference Guide
TGeoParaEditor.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_TGeoParaEditor
12 #define ROOT_TGeoParaEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoParaEditor //
17 // //
18 // Editor for a TGeoPara. //
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 TGeoPara;
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 TGeoParaEditor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fXi; // Initial X
44  Double_t fYi; // Initial Y
45  Double_t fZi; // Initial Z
46  Double_t fAlphai; // Initial alpha
47  Double_t fThetai; // Initial theta
48  Double_t fPhii; // Initial phi
49  TString fNamei; // Initial name
50  TGeoPara *fShape; // Shape object
51  Bool_t fIsModified; // Flag that volume was modified
52  Bool_t fIsShapeEditable; // Flag that the shape can be changed
53 
54  TGTextEntry *fShapeName; // Shape name text entry
55  TGNumberEntry *fEDx; // Number entry for DX2
56  TGNumberEntry *fEDy; // Number entry for DY
57  TGNumberEntry *fEDz; // Number entry for DZ
58  TGNumberEntry *fEAlpha; // Number entry for Alpha
59  TGNumberEntry *fETheta; // Number entry for Theta
60  TGNumberEntry *fEPhi ; // Number entry for Theta
61  TGTextButton *fApply; // Apply-Button to accept changes
62  TGTextButton *fUndo; // Undo-Button
63  TGCheckButton *fDelayed; // Check button for delayed draw
64 
65  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
66  Bool_t IsDelayed() const;
67 
68 public:
69  TGeoParaEditor(const TGWindow *p = 0,
70  Int_t width = 140, Int_t height = 30,
71  UInt_t options = kChildFrame,
73  virtual ~TGeoParaEditor();
74  virtual void SetModel(TObject *obj);
75 
76  void DoX();
77  void DoY();
78  void DoZ();
79  void DoAlpha();
80  void DoTheta();
81  void DoPhi();
82  void DoModified();
83  void DoName();
84  void DoApply();
85  void DoUndo();
86 
87  ClassDef(TGeoParaEditor,0) // TGeoPara editor
88 };
89 
90 #endif
TGNumberEntry * fEPhi
void DoX()
Slot for X.
void DoModified()
Slot for notifying modifications.
void DoZ()
Slot for Z.
Definition: TGTab.h:66
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoApply()
Slot for applying current settings.
virtual ~TGeoParaEditor()
Destructor.
void DoPhi()
Slot for phi.
Basic string class.
Definition: TString.h:137
void DoUndo()
Slot for undoing last operation.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void DoAlpha()
Slot for alpha.
#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
TGeoPara * fShape
TGTextButton * fUndo
void DoY()
Slot for Y.
TGeoParaEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for para editor.
Parallelepiped class.
Definition: TGeoPara.h:19
TGTextEntry * fShapeName
void DoTheta()
Slot for theta.
Double_t fThetai
TGNumberEntry * fEDz
unsigned int UInt_t
Definition: RtypesCore.h:42
TGCheckButton * fDelayed
Double_t fAlphai
TGNumberEntry * fETheta
virtual void SetModel(TObject *obj)
Connect to the selected object.
TGTextButton * fApply
TGNumberEntry * fEDx
double Double_t
Definition: RtypesCore.h:55
TGNumberEntry * fEDy
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fEAlpha
Mother of all ROOT objects.
Definition: TObject.h:37
void DoName()
Slot for name.
Bool_t fIsShapeEditable