Logo ROOT   6.10/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 #include "TGWidget.h"
23 #include "TGeoGedFrame.h"
24 
25 class TGeoBBox;
26 class TGeoTabManager;
27 class TGTextEntry;
28 class TGNumberEntry;
29 class TGTab;
30 class TGComboBox;
31 class TGTextButton;
32 class TGCheckButton;
33 class TString;
34 
35 class TGeoBBoxEditor : public TGeoGedFrame {
36 
37 protected:
38 
39  Double_t fDxi; // Initial box dx
40  Double_t fDyi; // Initial box dy
41  Double_t fDzi; // Initial box dz
42  Double_t fOrigi[3]; // Initial origin
43  TString fNamei; // Initial name
44  TGeoBBox *fShape; // Shape object
45  Bool_t fIsModified; // Flag that volume was modified
46  Bool_t fIsShapeEditable; // Flag that the shape can be changed
47  TGTextEntry *fShapeName; // Shape name text entry
48  TGNumberEntry *fBoxDx; // Number entry for box DX
49  TGNumberEntry *fBoxDy; // Number entry for box DY
50  TGNumberEntry *fBoxDz; // Number entry for box DZ
51  TGNumberEntry *fBoxOx; // Number entry for box OX
52  TGNumberEntry *fBoxOy; // Number entry for box OY
53  TGNumberEntry *fBoxOz; // Number entry for box OZ
54  TGTextButton *fApply; // Apply-Button to accept changes
55  TGTextButton *fUndo; // Undo-Button
56  TGCheckButton *fDelayed; // Check button for delayed draw
57 
58  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
59  Bool_t IsDelayed() const;
60 
61 public:
62  TGeoBBoxEditor(const TGWindow *p = 0,
63  Int_t width = 140, Int_t height = 30,
64  UInt_t options = kChildFrame,
66  virtual ~TGeoBBoxEditor();
67  virtual void SetModel(TObject *obj);
68 
69  void DoDx();
70  void DoDy();
71  void DoDz();
72  void DoOx();
73  void DoOy();
74  void DoOz();
75  void DoModified();
76  void DoName();
77  void DoApply();
78  void DoUndo();
79 
80  ClassDef(TGeoBBoxEditor,0) // TGeoBBox editor
81 };
82 
83 #endif
TGTextEntry * fShapeName
void DoUndo()
Slot for undoing last operation.
void DoDx()
Slot for Dx modification.
Box class.
Definition: TGeoBBox.h:17
void DoOz()
Slot for Oz modification.
Definition: TGTab.h:62
TGNumberEntry * fBoxOx
TGNumberEntry * fBoxOz
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t fOrigi[3]
#define ClassDef(name, id)
Definition: Rtypes.h:297
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGNumberEntry * fBoxDx
virtual void ConnectSignals2Slots()
Connect signals to slots.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
void DoDz()
Slot for Dz modification.
TGTextButton * fApply
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:37
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.
void DoOx()
Slot for Ox modification.
TGTextButton * fUndo
virtual ~TGeoBBoxEditor()
Destructor.