Logo ROOT   6.14/05
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 #include "TGWidget.h"
16 #include "TGeoGedFrame.h"
17 
18 class TGeoManager;
19 class TGeoVolume;
20 class TGeoShape;
21 class TGeoMedium;
22 class TGeoMaterial;
23 class TGeoMatrix;
24 class TGShutter;
25 class TGShutterItem;
26 class TGTextEntry;
27 class TGTab;
28 class TGComboBox;
29 class TGNumberEntry;
30 class TGTextButton;
31 class TGPictureButton;
32 class TGCheckButton;
33 class TGRadioButton;
34 class TGeoTabManager;
35 
36 class TGeoManagerEditor : public TGedFrame {
37 
38 protected:
39 
40  TGeoManager *fGeometry; // Selected geometry manager
41  TGeoTabManager *fTabMgr; // Tab manager
42  TGTab *fTab; // TGTab of GedEditor
43  TGCompositeFrame *fVolumeTab; // Tab of Volume tab
44  Bool_t fIsModified; // Flag that manager was modified
45  TGShutter *fCategories; // Categories shutter
46  TGTextEntry *fManagerName; // Name text entry
47  TGTextEntry *fManagerTitle; // Title text entry
48  TGTextEntry *fMediumName; // Medium name text entry
49  TGTextEntry *fMatrixName; // Matrix name text entry
50  TGTextEntry *fMaterialName; // Material name text entry
51  TGTextEntry *fVolumeName; // Volume name text entry
52  TGeoMaterial *fSelectedMaterial; // Selected material
53  TGeoMaterial *fSelectedMaterial2; // Selected material for medium creation
54  TGLabel *fLSelMaterial; // Selected material label
55  TGLabel *fLSelMaterial2; // Selected material label
56  TGPictureButton *fBSelMaterial; // Button for selecting a material
57  TGPictureButton *fBSelMaterial2; // Button for selecting a material
58  TGeoVolume *fSelectedVolume; // Selected volume
59  TGLabel *fLSelVolume; // Selected volume label
60  TGPictureButton *fBSelVolume; // Button for selecting a volume
61  TGeoShape *fSelectedShape; // Selected shape
62  TGeoShape *fSelectedShape2; // Selected shape for volume creation
63  TGLabel *fLSelShape; // Selected shape label
64  TGLabel *fLSelShape2; // Selected shape label
65  TGPictureButton *fBSelShape; // Button for selecting a shape
66  TGPictureButton *fBSelShape2; // Button for selecting a shape
67  TGeoMatrix *fSelectedMatrix; // Selected matrix
68  TGLabel *fLSelMatrix; // Selected matrix label
69  TGPictureButton *fBSelMatrix; // Button for selecting a matrix
70  TGeoMedium *fSelectedMedium; // Selected medium
71  TGeoMedium *fSelectedMedium2; // Selected medium for volume creation
72  TGLabel *fLSelMedium; // Selected medium label
73  TGLabel *fLSelMedium2; // Selected medium label
74  TGPictureButton *fBSelMedium; // Button for selecting a medium
75  TGPictureButton *fBSelMedium2; // Button for selecting a medium
76  TGPictureButton *fShapeButton[21]; // List of shape buttons
77  TGPictureButton *fMatrixButton[3]; // List of matrix buttons
78  TGPictureButton *fVolumeButton[2]; // List of volume buttons
79  TGPictureButton *fMaterialButton[2]; // List of material buttons
80  TGRadioButton *fExportOption[2]; // Export option buttons
81  TGTextButton *fExportButton; // Button to export geometry
82  TGComboBox *fElementList; // Combo box for elements
83  TGNumberEntry *fEntryDensity; // Number entry for material density
84  TGPictureButton *fMediumButton; // Button to create a medium
85  TGNumberEntry *fMediumId; // Medium ID number entry
86  TGTextButton *fEditShape; // Button for editing selected shape
87  TGTextButton *fEditMedium; // Button for editing a medium
88  TGTextButton *fEditMaterial; // Button for editing a material
89  TGTextButton *fEditMatrix; // Button for editing a matrix
90  TGTextButton *fEditVolume; // Button for editing a volume
91  TGTextButton *fSetTopVolume; // Button for setting top volume
92  TGLabel *fLSelTop; // Selected top volume
93  TGPictureButton *fBSelTop; // Button for selecting top volume
94  TGTextButton *fCloseGeometry; // Button for closing the geometry
95  TGCompositeFrame *f2; // Parent frame for shape editing
96  TGCompositeFrame *f3; // Parent frame for volume editing
97  TGCompositeFrame *f4; // Parent frame for materials editing
98  TGCompositeFrame *f5; // Parent frame for media editing
99  TGCompositeFrame *f6; // Parent frame for matrices editing
100  TGCompositeFrame *f7; // Parent frame for closing geometry
101  TCanvas *fConnectedCanvas; // Canvas connected to SelectedSlot()
102 
103  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
104  void ShowSelectShape(Bool_t show=kTRUE);
105  void ShowSelectVolume(Bool_t show=kTRUE);
106  void ShowSelectMaterial(Bool_t show=kTRUE);
107  void ShowSelectMedium(Bool_t show=kTRUE);
108  void ShowSelectMatrix(Bool_t show=kTRUE);
109 
110 public:
111  TGeoManagerEditor(const TGWindow *p = 0,
112  Int_t width = 140, Int_t height = 30,
113  UInt_t options = kChildFrame,
115  virtual ~TGeoManagerEditor();
116  static void LoadLib() {;}
117  virtual void SetModel(TObject *obj);
118 
119  virtual void SelectedSlot(TVirtualPad* pad, TObject* obj, Int_t event);
120  void ConnectSelected(TCanvas *c);
121  void DisconnectSelected();
122 
123  void DoName();
124  void DoCreateBox();
125  void DoCreatePara();
126  void DoCreateTrd1();
127  void DoCreateTrd2();
128  void DoCreateTrap();
129  void DoCreateGtra();
130  void DoCreateXtru();
131  void DoCreateArb8();
132  void DoCreateTube();
133  void DoCreateTubs();
134  void DoCreateCone();
135  void DoCreateCons();
136  void DoCreateSphe();
137  void DoCreateCtub();
138  void DoCreateEltu();
139  void DoCreateTorus();
140  void DoCreatePcon();
141  void DoCreatePgon();
142  void DoCreateHype();
143  void DoCreateParab();
144  void DoCreateComposite();
145  void DoCreateMaterial();
146  void DoCreateMixture();
147  void DoCreateMedium();
148  void DoCreateTranslation();
149  void DoCreateRotation();
150  void DoCreateCombi();
151  void DoCreateVolume();
152  void DoCreateAssembly();
153  void DoEditShape();
154  void DoEditVolume();
155  void DoEditMedium();
156  void DoEditMaterial();
157  void DoEditMatrix();
158  void DoSelectShape();
159  void DoSelectShape2();
160  void DoSelectVolume();
161  void DoSelectMatrix();
162  void DoSelectMaterial();
163  void DoSelectMaterial2();
164  void DoSelectMedium();
165  void DoSelectMedium2();
166  void DoSetTopVolume();
167  void DoSelectTopVolume();
168  void DoExportGeometry();
169  void DoCloseGeometry();
170 
171  ClassDef(TGeoManagerEditor,0) // TGeoManager editor
172 };
173 
174 #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:38
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:40
void DoCreateSphe()
Create a sphere.
void DoEditMaterial()
Slot for editing selected material.
void DoCloseGeometry()
Slot for closing the geometry.
TGShutter * fCategories
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
TGTextEntry * fMatrixName
void DoSelectMatrix()
Slot for selecting an existing matrix.
Manager for all editor tabs.
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 elliptical 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:320
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 setting 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.
Editor for TGeoManager class.
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
#define c(i)
Definition: RSha256.hxx:101
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:87
void DoCreateAssembly()
Create a new volume assembly.
void DoEditMatrix()
Slot for editing selected matrix.
TGeoMaterial * fSelectedMaterial
void DoName()
Change name/title of the geometry.