ROOT  6.06/09
Reference Guide
TGeoBBoxEditor.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_TGeoBBoxEditor
12 #define ROOT_TGeoBBoxEditor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoBBoxEditor //
17 // //
18 // Editor for a TGeoBBox. //
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 TGeoBBox;
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 TGeoBBoxEditor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fDxi; // Initial box dx
44  Double_t fDyi; // Initial box dy
45  Double_t fDzi; // Initial box dz
46  Double_t fOrigi[3]; // Initial origin
47  TString fNamei; // Initial name
48  TGeoBBox *fShape; // Shape object
49  Bool_t fIsModified; // Flag that volume was modified
50  Bool_t fIsShapeEditable; // Flag that the shape can be changed
51  TGTextEntry *fShapeName; // Shape name text entry
52  TGNumberEntry *fBoxDx; // Number entry for box DX
53  TGNumberEntry *fBoxDy; // Number entry for box DY
54  TGNumberEntry *fBoxDz; // Number entry for box DZ
55  TGNumberEntry *fBoxOx; // Number entry for box OX
56  TGNumberEntry *fBoxOy; // Number entry for box OY
57  TGNumberEntry *fBoxOz; // Number entry for box OZ
58  TGTextButton *fApply; // Apply-Button to accept changes
59  TGTextButton *fUndo; // Undo-Button
60  TGCheckButton *fDelayed; // Check button for delayed draw
61 
62  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
63  Bool_t IsDelayed() const;
64 
65 public:
66  TGeoBBoxEditor(const TGWindow *p = 0,
67  Int_t width = 140, Int_t height = 30,
68  UInt_t options = kChildFrame,
70  virtual ~TGeoBBoxEditor();
71  virtual void SetModel(TObject *obj);
72 
73  void DoDx();
74  void DoDy();
75  void DoDz();
76  void DoOx();
77  void DoOy();
78  void DoOz();
79  void DoModified();
80  void DoName();
81  void DoApply();
82  void DoUndo();
83 
84  ClassDef(TGeoBBoxEditor,0) // TGeoBBox editor
85 };
86 
87 #endif
TGTextEntry * fShapeName
void DoUndo()
Slot for undoing last operation.
void DoDx()
Slot for Dx modification.
void DoOz()
Slot for Oz modification.
Definition: TGTab.h:66
Bool_t IsDelayed() const
Check if shape drawing is delayed.
TGNumberEntry * fBoxOx
TGNumberEntry * fBoxOz
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGNumberEntry * fBoxDx
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoDz()
Slot for Dz modification.
TGTextButton * fApply
ClassDef(TGedFrame, 0)
void DoDy()
Slot for Dy modification.
TGNumberEntry * fBoxDz
void DoApply()
Slot for applying current parameters.
Bool_t fIsShapeEditable
unsigned int UInt_t
Definition: RtypesCore.h:42
TGeoBBox * fShape
void DoModified()
Slot for modifying current parameters.
double Double_t
Definition: RtypesCore.h:55
virtual void SetModel(TObject *obj)
Update editor for a new selected box.
Mother of all ROOT objects.
Definition: TObject.h:58
void DoOy()
Slot for Oy modification.
TGNumberEntry * fBoxDy
TGNumberEntry * fBoxOy
TGCheckButton * fDelayed
TGeoBBoxEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoName()
Slot for name.
TObject * obj
void DoOx()
Slot for Ox modification.
TGTextButton * fUndo
virtual ~TGeoBBoxEditor()
Destructor.