Logo ROOT   6.08/07
Reference Guide
TGeoTrd1Editor.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_TGeoTrd1Editor
12 #define ROOT_TGeoTrd1Editor
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGeoTrd1Editor //
17 // //
18 // Editor for a TGeoTrd1. //
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 TGeoTrd1;
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 TGeoTrd1Editor : public TGeoGedFrame {
40 
41 protected:
42 
43  Double_t fDxi1; // Initial dx1
44  Double_t fDxi2; // Initial dx2
45  Double_t fDyi; // Initial dy
46  Double_t fDzi; // Initial dz
47  TString fNamei; // Initial name
48  TGeoTrd1 *fShape; // Shape object
49  Bool_t fIsModified; // Flag that volume was modified
50  Bool_t fIsShapeEditable; // Flag that the shape can be changed
51 
52  TGTextEntry *fShapeName; // Shape name text entry
53  TGNumberEntry *fEDx1; // Number entry for DX1
54  TGNumberEntry *fEDx2; // Number entry for DX2
55  TGNumberEntry *fEDy; // Number entry for DY
56  TGNumberEntry *fEDz; // Number entry for DZ
57  TGTextButton *fApply; // Apply-Button to accept changes
58  TGTextButton *fUndo; // Undo-Button
59  TGCheckButton *fDelayed; // Check button for delayed draw
60 
61  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
62  Bool_t IsDelayed() const;
63 
64 public:
65  TGeoTrd1Editor(const TGWindow *p = 0,
66  Int_t width = 140, Int_t height = 30,
67  UInt_t options = kChildFrame,
69  virtual ~TGeoTrd1Editor();
70  virtual void SetModel(TObject *obj);
71 
72  void DoDx1();
73  void DoDx2();
74  void DoDy();
75  void DoDz();
76  void DoModified();
77  void DoName();
78  void DoApply();
79  void DoUndo();
80 
81  ClassDef(TGeoTrd1Editor,0) // TGeoTrd1 editor
82 };
83 
84 #endif
Definition: TGTab.h:66
void DoModified()
Slot for signaling modifications.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fEDx1
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
A trapezoid with only x length varying with z.
Definition: TGeoTrd1.h:19
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual ~TGeoTrd1Editor()
Destructor.
#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 DoApply()
Slot for applying modifications.
TGTextButton * fApply
TGTextButton * fUndo
TGeoTrd1 * fShape
TGNumberEntry * fEDx2
TGNumberEntry * fEDz
TGNumberEntry * fEDy
void DoDy()
Slot for dy.
void DoUndo()
Slot for undoing last operation.
unsigned int UInt_t
Definition: RtypesCore.h:42
TGeoTrd1Editor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for trd1 editor.
void DoDz()
Slot for dz.
double Double_t
Definition: RtypesCore.h:55
TGTextEntry * fShapeName
TGCheckButton * fDelayed
Mother of all ROOT objects.
Definition: TObject.h:37
Bool_t fIsShapeEditable
void DoDx1()
Slot for dx1.
virtual void SetModel(TObject *obj)
Connect to the selected object.
void DoName()
Perform name change.
void DoDx2()
Slot for dx2.