Logo ROOT   6.10/09
Reference Guide
TGeoManagerEditor.h
Go to the documentation of this file.
1 // @(#):$Id$
2 // Author: M.Gheata
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoManagerEditor
13 #define ROOT_TGeoManagerEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TGeoManagerEditor //
18 // //
19 // Editor for a TGeoManager. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGWidget.h"
24 #include "TGeoGedFrame.h"
25 
26 class TGeoManager;
27 class TGeoVolume;
28 class TGeoShape;
29 class TGeoMedium;
30 class TGeoMaterial;
31 class TGeoMatrix;
32 class TGShutter;
33 class TGShutterItem;
34 class TGTextEntry;
35 class TGTab;
36 class TGComboBox;
37 class TGNumberEntry;
38 class TGTextButton;
39 class TGPictureButton;
40 class TGCheckButton;
41 class TGRadioButton;
42 class TGeoTabManager;
43 
44 class TGeoManagerEditor : public TGedFrame {
45 
46 protected:
47 
48  TGeoManager *fGeometry; // Selected geometry manager
49  TGeoTabManager *fTabMgr; // Tab manager
50  TGTab *fTab; // TGTab of GedEditor
51  TGCompositeFrame *fVolumeTab; // Tab of Volume tab
52  Bool_t fIsModified; // Flag that manager was modified
53  TGShutter *fCategories; // Categories shutter
54  TGTextEntry *fManagerName; // Name text entry
55  TGTextEntry *fManagerTitle; // Title text entry
56  TGTextEntry *fMediumName; // Medium name text entry
57  TGTextEntry *fMatrixName; // Matrix name text entry
58  TGTextEntry *fMaterialName; // Material name text entry
59  TGTextEntry *fVolumeName; // Volume name text entry
60  TGeoMaterial *fSelectedMaterial; // Selected material
61  TGeoMaterial *fSelectedMaterial2; // Selected material for medium creation
62  TGLabel *fLSelMaterial; // Selected material label
63  TGLabel *fLSelMaterial2; // Selected material label
64  TGPictureButton *fBSelMaterial; // Button for selecting a material
65  TGPictureButton *fBSelMaterial2; // Button for selecting a material
66  TGeoVolume *fSelectedVolume; // Selected volume
67  TGLabel *fLSelVolume; // Selected volume label
68  TGPictureButton *fBSelVolume; // Button for selecting a volume
69  TGeoShape *fSelectedShape; // Selected shape
70  TGeoShape *fSelectedShape2; // Selected shape for volume creation
71  TGLabel *fLSelShape; // Selected shape label
72  TGLabel *fLSelShape2; // Selected shape label
73  TGPictureButton *fBSelShape; // Button for selecting a shape
74  TGPictureButton *fBSelShape2; // Button for selecting a shape
75  TGeoMatrix *fSelectedMatrix; // Selected matrix
76  TGLabel *fLSelMatrix; // Selected matrix label
77  TGPictureButton *fBSelMatrix; // Button for selecting a matrix
78  TGeoMedium *fSelectedMedium; // Selected medium
79  TGeoMedium *fSelectedMedium2; // Selected medium for volume creation
80  TGLabel *fLSelMedium; // Selected medium label
81  TGLabel *fLSelMedium2; // Selected medium label
82  TGPictureButton *fBSelMedium; // Button for selecting a medium
83  TGPictureButton *fBSelMedium2; // Button for selecting a medium
84  TGPictureButton *fShapeButton[21]; // List of shape buttons
85  TGPictureButton *fMatrixButton[3]; // List of matrix buttons
86  TGPictureButton *fVolumeButton[2]; // List of volume buttons
87  TGPictureButton *fMaterialButton[2]; // List of material buttons
88  TGRadioButton *fExportOption[2]; // Export option buttons
89  TGTextButton *fExportButton; // Button to export geometry
90  TGComboBox *fElementList; // Combo box for elements
91  TGNumberEntry *fEntryDensity; // Number entry for material density
92  TGPictureButton *fMediumButton; // Button to create a medium
93  TGNumberEntry *fMediumId; // Medium ID number entry
94  TGTextButton *fEditShape; // Button for editing selected shape
95  TGTextButton *fEditMedium; // Button for editing a medium
96  TGTextButton *fEditMaterial; // Button for editing a material
97  TGTextButton *fEditMatrix; // Button for editing a matrix
98  TGTextButton *fEditVolume; // Button for editing a volume
99  TGTextButton *fSetTopVolume; // Button for setting top volume
100  TGLabel *fLSelTop; // Selected top volume
101  TGPictureButton *fBSelTop; // Button for selecting top volume
102  TGTextButton *fCloseGeometry; // Button for closing the geometry
103  TGCompositeFrame *f2; // Parent frame for shape editing
104  TGCompositeFrame *f3; // Parent frame for volume editing
105  TGCompositeFrame *f4; // Parent frame for materials editing
106  TGCompositeFrame *f5; // Parent frame for media editing
107  TGCompositeFrame *f6; // Parent frame for matrices editing
108  TGCompositeFrame *f7; // Parent frame for closing geometry
109  TCanvas *fConnectedCanvas; // Canvas connected to SelectedSlot()
110 
111  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
112  void ShowSelectShape(Bool_t show=kTRUE);
113  void ShowSelectVolume(Bool_t show=kTRUE);
114  void ShowSelectMaterial(Bool_t show=kTRUE);
115  void ShowSelectMedium(Bool_t show=kTRUE);
116  void ShowSelectMatrix(Bool_t show=kTRUE);
117 
118 public:
119  TGeoManagerEditor(const TGWindow *p = 0,
120  Int_t width = 140, Int_t height = 30,
121  UInt_t options = kChildFrame,
123  virtual ~TGeoManagerEditor();
124  static void LoadLib() {;}
125  virtual void SetModel(TObject *obj);
126 
127  virtual void SelectedSlot(TVirtualPad* pad, TObject* obj, Int_t event);
128  void ConnectSelected(TCanvas *c);
129  void DisconnectSelected();
130 
131  void DoName();
132  void DoCreateBox();
133  void DoCreatePara();
134  void DoCreateTrd1();
135  void DoCreateTrd2();
136  void DoCreateTrap();
137  void DoCreateGtra();
138  void DoCreateXtru();
139  void DoCreateArb8();
140  void DoCreateTube();
141  void DoCreateTubs();
142  void DoCreateCone();
143  void DoCreateCons();
144  void DoCreateSphe();
145  void DoCreateCtub();
146  void DoCreateEltu();
147  void DoCreateTorus();
148  void DoCreatePcon();
149  void DoCreatePgon();
150  void DoCreateHype();
151  void DoCreateParab();
152  void DoCreateComposite();
153  void DoCreateMaterial();
154  void DoCreateMixture();
155  void DoCreateMedium();
156  void DoCreateTranslation();
157  void DoCreateRotation();
158  void DoCreateCombi();
159  void DoCreateVolume();
160  void DoCreateAssembly();
161  void DoEditShape();
162  void DoEditVolume();
163  void DoEditMedium();
164  void DoEditMaterial();
165  void DoEditMatrix();
166  void DoSelectShape();
167  void DoSelectShape2();
168  void DoSelectVolume();
169  void DoSelectMatrix();
170  void DoSelectMaterial();
171  void DoSelectMaterial2();
172  void DoSelectMedium();
173  void DoSelectMedium2();
174  void DoSetTopVolume();
175  void DoSelectTopVolume();
176  void DoExportGeometry();
177  void DoCloseGeometry();
178 
179  ClassDef(TGeoManagerEditor,0) // TGeoManager editor
180 };
181 
182 #endif
void DoEditMedium()
Slot for editing selected medium.
TGPictureButton * fBSelTop
void DoCreateCons()
Create a cone segment.
TGPictureButton * fBSelMedium
TGNumberEntry * fMediumId
The manager class for any TGeo geometry.
Definition: TGeoManager.h:37
void DoExportGeometry()
Export geometry as .root or .C file.
void DoSelectMedium()
Slot for selecting an existing medium.
void ShowSelectShape(Bool_t show=kTRUE)
Show/hide interface for shape selection.
void DoCreateComposite()
Create a composite shape.
TGPictureButton * fVolumeButton[2]
void DoCreateXtru()
Create an extruded polygone.
Definition: TGTab.h:62
virtual void ConnectSignals2Slots()
Connect signals to slots.
Geometrical transformation package.
Definition: TGeoMatrix.h:38
void DoCreateSphe()
Create a sphere.
void DoEditMaterial()
Slot for editing selected material.
void DoCloseGeometry()
Slot for closing the geometry.
TGShutter * fCategories
TGTextEntry * fMatrixName
void DoSelectMatrix()
Slot for selecting an existing matrix.
void ShowSelectMatrix(Bool_t show=kTRUE)
Show/hide interface for matrix selection.
void DoSelectShape()
Slot for selecting an existing shape.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:48
TGeoVolume * fSelectedVolume
void DoCreateMaterial()
Create a new material.
TGeoMedium * fSelectedMedium
void DoCreateEltu()
Create an eliptical tube.
Base class describing materials.
Definition: TGeoMaterial.h:29
void DoCreateTrd2()
Create a Trd2.
void DoCreateTrd1()
Create a Trd1.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void DoCreatePara()
Create a parallelipiped.
TGPictureButton * fBSelMaterial2
void DoCreateParab()
Create a paraboloid.
void DoSelectMedium2()
Slot for selecting an existing medium for making a volume.
void DoCreateTube()
Create a tube.
TGeoShape * fSelectedShape
void DoSetTopVolume()
Set top volume for the geometry.
TGPictureButton * fBSelVolume
TGTextEntry * fManagerName
void DoSelectVolume()
Slot for selecting an existing volume.
TGeoTabManager * fTabMgr
TGPictureButton * fBSelMaterial
TGTextButton * fEditVolume
#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 DoCreateBox()
Create a box.
void DoCreateTranslation()
Create a new translation.
void DoEditVolume()
Slot for editing selected volume.
void DoCreateCombi()
Create a new translation + rotation.
TGCompositeFrame * f5
void DoSelectTopVolume()
Slot for seting top geometry volume.
TGCompositeFrame * f2
void DoCreateCone()
Create a cone.
TGPictureButton * fShapeButton[21]
void DoCreateRotation()
Create a new rotation.
void DoCreateTorus()
Create a torus shape.
void DoSelectMaterial()
Slot for selecting an existing material.
void DoCreateArb8()
Create an arbitrary polygone with maximum 8 vertices sitting on 2 parallel planes.
void DoCreateMixture()
Create a new mixture.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
TGeoShape * fSelectedShape2
TGTextButton * fEditMedium
TGeoMedium * fSelectedMedium2
void DoEditShape()
Slot for editing selected shape.
void ShowSelectMaterial(Bool_t show=kTRUE)
Show/hide interface for material selection.
TGCompositeFrame * f4
void DoCreateMedium()
Create a new medium.
Base abstract class for all shapes.
Definition: TGeoShape.h:25
void ConnectSelected(TCanvas *c)
TGTextButton * fCloseGeometry
TGeoMatrix * fSelectedMatrix
void ShowSelectVolume(Bool_t show=kTRUE)
Show/hide interface for volume selection.
virtual void SetModel(TObject *obj)
Refresh editor according the selected obj.
unsigned int UInt_t
Definition: RtypesCore.h:42
void DoCreateTrap()
Create a general trapezoid.
TGTextButton * fSetTopVolume
void ShowSelectMedium(Bool_t show=kTRUE)
Show/hide interface for medium selection.
TGTextButton * fEditMaterial
TGComboBox * fElementList
TGeoMaterial * fSelectedMaterial2
TGTextEntry * fVolumeName
void DoCreateGtra()
Create a twisted trapezoid.
The Canvas class.
Definition: TCanvas.h:31
virtual ~TGeoManagerEditor()
Destructor.
TGCompositeFrame * f6
TGCompositeFrame * f7
void DoCreateHype()
Create a hyperboloid.
TGTextEntry * fMaterialName
void DoCreateTubs()
Create a tube segment.
void DoSelectMaterial2()
Slot for selecting an existing material and making a medium.
TGCompositeFrame * f3
TGTextButton * fEditShape
static void LoadLib()
TGNumberEntry * fEntryDensity
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:23
TGeoManagerEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for manager editor.
TGPictureButton * fMatrixButton[3]
virtual void SelectedSlot(TVirtualPad *pad, TObject *obj, Int_t event)
Connected to TCanvas::Selected.
TGPictureButton * fBSelMedium2
void DoSelectShape2()
Slot for selecting a shape for making a volume.
TGTextButton * fExportButton
Mother of all ROOT objects.
Definition: TObject.h:37
TGPictureButton * fBSelShape
TGPictureButton * fMediumButton
void DoCreatePgon()
Create a polygone shape.
TGeoManager * fGeometry
TGPictureButton * fBSelShape2
TGCompositeFrame * fVolumeTab
TGRadioButton * fExportOption[2]
TGTextEntry * fManagerTitle
void DoCreatePcon()
Create a polycone shape.
TGPictureButton * fBSelMatrix
void DoCreateVolume()
Create a new volume.
TGTextButton * fEditMatrix
TGPictureButton * fMaterialButton[2]
void DoCreateCtub()
Create a cut tube.
TGTextEntry * fMediumName
const Bool_t kTRUE
Definition: RtypesCore.h:91
void DoCreateAssembly()
Create a new volume assembly.
void DoEditMatrix()
Slot for editing selected matrix.
TGeoMaterial * fSelectedMaterial
void DoName()
Change name/title of the geometry.