Logo ROOT   6.08/07
Reference Guide
TGeoTrd2Editor.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_TGeoTrd2Editor
12 #define ROOT_TGeoTrd2Editor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoTrd2Editor //
17 // //
18 // Editor for a TGeoTrd2. //
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 TGeoTrd2;
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 TGeoTrd2Editor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fDxi1; // Initial dx1
44  Double_t fDxi2; // Initial dx2
45  Double_t fDyi1; // Initial dy1
46  Double_t fDyi2; // Initial dy2
47  Double_t fDzi; // Initial dz
48  TString fNamei; // Initial name
49  TGeoTrd2 *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 *fEDx1; // Number entry for DX1
55  TGNumberEntry *fEDx2; // Number entry for DX2
56  TGNumberEntry *fEDy1; // Number entry for DY1
57  TGNumberEntry *fEDy2; // Number entry for DY1
58  TGNumberEntry *fEDz; // Number entry for DZ
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  TGeoTrd2Editor(const TGWindow *p = 0,
68  Int_t width = 140, Int_t height = 30,
69  UInt_t options = kChildFrame,
71  virtual ~TGeoTrd2Editor();
72  virtual void SetModel(TObject *obj);
73 
74  void DoDx1();
75  void DoDx2();
76  void DoDy1();
77  void DoDy2();
78  void DoDz();
79  void DoModified();
80  void DoName();
81  void DoApply();
82  void DoUndo();
83 
84  ClassDef(TGeoTrd2Editor,0) // TGeoTrd2 editor
85 };
86 
87 #endif
Definition: TGTab.h:66
void DoApply()
Slot for applying modifications.
TGTextButton * fUndo
TGNumberEntry * fEDy2
TGNumberEntry * fEDx2
void DoUndo()
Slot for undoing last operation.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGNumberEntry * fEDy1
void DoDx2()
Slot for dx2.
void DoDx1()
Slot for dx1.
virtual void ConnectSignals2Slots()
Connect signals to slots.
#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
TGeoTrd2 * fShape
TGNumberEntry * fEDz
virtual void SetModel(TObject *obj)
Connect to the selected object.
void DoModified()
Slot for signaling modifications.
A trapezoid with both x and y lengths varying with z.
Definition: TGeoTrd2.h:19
TGeoTrd2Editor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for trd2 editor.
void DoDy2()
Slot for dy2.
Bool_t IsDelayed() const
Check if shape drawing is delayed.
unsigned int UInt_t
Definition: RtypesCore.h:42
void DoDy1()
Slot for dy1.
TGCheckButton * fDelayed
void DoName()
Perform name change.
double Double_t
Definition: RtypesCore.h:55
TGTextEntry * fShapeName
TGNumberEntry * fEDx1
Mother of all ROOT objects.
Definition: TObject.h:37
Bool_t fIsShapeEditable
TGTextButton * fApply
void DoDz()
Slot for dz.
virtual ~TGeoTrd2Editor()
Destructor.