Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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,
114  Pixel_t back = GetDefaultFrameBackground());
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