Logo ROOT   6.10/09
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 #include "TGWidget.h"
23 #include "TGeoGedFrame.h"
24 
25 class TGeoTrd1;
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 TGeoTrd1Editor : public TGeoGedFrame {
36 
37 protected:
38 
39  Double_t fDxi1; // Initial dx1
40  Double_t fDxi2; // Initial dx2
41  Double_t fDyi; // Initial dy
42  Double_t fDzi; // Initial dz
43  TString fNamei; // Initial name
44  TGeoTrd1 *fShape; // Shape object
45  Bool_t fIsModified; // Flag that volume was modified
46  Bool_t fIsShapeEditable; // Flag that the shape can be changed
47 
48  TGTextEntry *fShapeName; // Shape name text entry
49  TGNumberEntry *fEDx1; // Number entry for DX1
50  TGNumberEntry *fEDx2; // Number entry for DX2
51  TGNumberEntry *fEDy; // Number entry for DY
52  TGNumberEntry *fEDz; // Number entry for DZ
53  TGTextButton *fApply; // Apply-Button to accept changes
54  TGTextButton *fUndo; // Undo-Button
55  TGCheckButton *fDelayed; // Check button for delayed draw
56 
57  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
58  Bool_t IsDelayed() const;
59 
60 public:
61  TGeoTrd1Editor(const TGWindow *p = 0,
62  Int_t width = 140, Int_t height = 30,
63  UInt_t options = kChildFrame,
65  virtual ~TGeoTrd1Editor();
66  virtual void SetModel(TObject *obj);
67 
68  void DoDx1();
69  void DoDx2();
70  void DoDy();
71  void DoDz();
72  void DoModified();
73  void DoName();
74  void DoApply();
75  void DoUndo();
76 
77  ClassDef(TGeoTrd1Editor,0) // TGeoTrd1 editor
78 };
79 
80 #endif
Definition: TGTab.h:62
void DoModified()
Slot for signaling modifications.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGNumberEntry * fEDx1
Basic string class.
Definition: TString.h:129
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:17
Bool_t IsDelayed() const
Check if shape drawing is delayed.
virtual ~TGeoTrd1Editor()
Destructor.
#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
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.