86 ClassImp(TGeoManagerEditor);
89 kMANAGER_NAME, kMANAGER_TITLE,
90 kMANAGER_SHAPE_SELECT, kMANAGER_MEDIA_SELECT,kMANAGER_MATERIAL_SELECT, kMANAGER_ELEMENT_SELECT,
91 kMANAGER_SHAPE_SELECT2, kMANAGER_MEDIUM_SELECT2, kMANAGER_VOLUME_SELECT,
92 kMANAGER_EDIT_SHAPE, kMANAGER_EDIT_MEDIUM, kMANAGER_DENSITY_SELECT, kMANAGER_NELEM_SELECT,
93 kMANAGER_MATERIAL_SELECT2, kMANAGER_MEDIUM_SELECT, kMANAGER_MATRIX_SELECT, kMANAGER_TOP_SELECT,
94 kEXPORT_ROOT, kEXPORT_C, kEXPORT_GEOMETRY,
95 kCAT_GENERAL, kCAT_SHAPES, kCAT_VOLUMES, kCAT_MEDIA, kCAT_MATERIALS, kCAT_MATRICES,
96 kCREATE_BOX, kCREATE_PARA, kCREATE_TRD1, kCREATE_TRD2,
97 kCREATE_TRAP, kCREATE_GTRA, kCREATE_XTRU, kCREATE_ARB8,
98 kCREATE_TUBE, kCREATE_TUBS, kCREATE_CONE, kCREATE_CONS,
99 kCREATE_SPHE, kCREATE_CTUB, kCREATE_ELTU, kCREATE_TORUS,
100 kCREATE_PCON, kCREATE_PGON, kCREATE_HYPE, kCREATE_PARAB, kCREATE_COMP,
101 kCREATE_MATERIAL, kCREATE_MIXTURE, kCREATE_MEDIUM, kCREATE_VOLUME, kCREATE_ASSEMBLY,
102 kCREATE_TRANSLATION, kCREATE_ROTATION, kCREATE_COMBI,
103 kMEDIUM_NAME, kMEDIUM_ID, kMATRIX_NAME, kMATERIAL_NAME, kVOLUME_NAME,
104 kMANAGER_APPLY, kMANAGER_CANCEL, kMANAGER_UNDO
110 TGeoManagerEditor::TGeoManagerEditor(
const TGWindow *p, Int_t width,
111 Int_t height, UInt_t options, Pixel_t back)
112 : TGedFrame(p, width, height, options | kVerticalFrame, back)
114 fGeometry = gGeoManager;
117 fConnectedCanvas = 0;
119 fIsModified = kFALSE;
120 TGCompositeFrame *f1;
124 fCategories =
new TGShutter(
this, kSunkenFrame | kFixedHeight);
126 TGCompositeFrame *container;
129 TGShutterItem *si =
new TGShutterItem(fCategories,
new TGHotString(
"General"),kCAT_GENERAL);
130 container = (TGCompositeFrame*)si->GetContainer();
131 container->SetBackgroundColor(GetDefaultFrameBackground());
132 fCategories->AddItem(si);
134 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
135 f1->AddFrame(label =
new TGLabel(f1,
"Name/Title"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
136 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
137 gClient->GetColorByName(
"#ff0000", color);
138 label->SetTextColor(color);
139 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
140 fManagerName =
new TGTextEntry(container,
new TGTextBuffer(50), kMANAGER_NAME);
141 fManagerName->Resize(135, fManagerName->GetDefaultHeight());
142 fManagerName->SetToolTipText(
"Enter the geometry name");
143 container->AddFrame(fManagerName,
new TGLayoutHints(kLHintsLeft, 3, 1, 0, 0));
144 fManagerTitle =
new TGTextEntry(container,
new TGTextBuffer(50), kMANAGER_TITLE);
145 fManagerTitle->Resize(135, fManagerTitle->GetDefaultHeight());
146 fManagerTitle->SetToolTipText(
"Enter the geometry name");
147 container->AddFrame(fManagerTitle,
new TGLayoutHints(kLHintsLeft, 3, 1, 0, 0));
148 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
149 f1->AddFrame(label =
new TGLabel(f1,
"Export geometry"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
150 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
151 gClient->GetColorByName(
"#ff0000", color);
152 label->SetTextColor(color);
153 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 6, 0));
154 TString stitle =
"Options";
155 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
156 TGButtonGroup *bg =
new TGVButtonGroup(f1, stitle);
157 fExportOption[0] =
new TGRadioButton(bg,
".root", kEXPORT_ROOT);
158 fExportOption[1] =
new TGRadioButton(bg,
".C", kEXPORT_C);
159 fExportButton =
new TGTextButton(f1,
"Export", kEXPORT_GEOMETRY);
160 bg->SetRadioButtonExclusive();
161 bg->SetButton(kEXPORT_ROOT);
163 f1->AddFrame(bg,
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
164 f1->AddFrame(fExportButton,
new TGLayoutHints(kLHintsLeft, 20, 2, 22, 0));
165 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2));
167 f7 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
168 f1 =
new TGCompositeFrame(f7, 155, 10, kHorizontalFrame | kFixedWidth);
169 f1->AddFrame(label =
new TGLabel(f1,
"Close geometry"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
170 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
171 gClient->GetColorByName(
"#ff0000", color);
172 label->SetTextColor(color);
173 f7->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
174 f1 =
new TGCompositeFrame(f7, 155, 30, kHorizontalFrame | kFixedWidth);
175 fLSelTop =
new TGLabel(f1,
"Select top");
176 gClient->GetColorByName(
"#0000ff", color);
177 fLSelTop->SetTextColor(color);
178 fLSelTop->ChangeOptions(kSunkenFrame | kDoubleBorder);
179 f1->AddFrame(fLSelTop,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
180 fBSelTop =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_TOP_SELECT);
181 fBSelTop->SetToolTipText(
"Select the top volume");
182 fBSelTop->Associate(
this);
183 f1->AddFrame(fBSelTop,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
184 fCloseGeometry =
new TGTextButton(f1,
"Close");
185 f1->AddFrame(fCloseGeometry,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
186 fCloseGeometry->SetToolTipText(
"Close geometry to make it ready for tracking");
187 fCloseGeometry->Associate(
this);
188 f7->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
189 container->AddFrame(f7,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
192 si =
new TGShutterItem(fCategories,
new TGHotString(
"Shapes"),kCAT_SHAPES);
193 container = (TGCompositeFrame*)si->GetContainer();
194 container->SetBackgroundColor(GetDefaultFrameBackground());
195 fCategories->AddItem(si);
198 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
199 f1->AddFrame(label =
new TGLabel(f1,
"Create new shape"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
200 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
201 gClient->GetColorByName(
"#ff0000", color);
202 label->SetTextColor(color);
203 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
204 TGLayoutHints *lhb =
new TGLayoutHints(kLHintsLeft, 0, 4, 0, 0);
205 TGLayoutHints *lhf1 =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
207 f1 =
new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
208 fShapeButton[0] =
new TGPictureButton(f1, fClient->GetPicture(
"geobbox_t.xpm"), kCREATE_BOX);
209 fShapeButton[0]->SetToolTipText(
"Create a box");
210 fShapeButton[1] =
new TGPictureButton(f1, fClient->GetPicture(
"geopara_t.xpm"), kCREATE_PARA);
211 fShapeButton[1]->SetToolTipText(
"Create a parallelipiped");
212 fShapeButton[2] =
new TGPictureButton(f1, fClient->GetPicture(
"geotrd1_t.xpm"), kCREATE_TRD1);
213 fShapeButton[2]->SetToolTipText(
"Create a TRD1 trapezoid");
214 fShapeButton[3] =
new TGPictureButton(f1, fClient->GetPicture(
"geotrd2_t.xpm"), kCREATE_TRD2);
215 fShapeButton[3]->SetToolTipText(
"Create a TRD2 trapezoid");
216 fShapeButton[4] =
new TGPictureButton(f1, fClient->GetPicture(
"geotrap_t.xpm"), kCREATE_TRAP);
217 fShapeButton[4]->SetToolTipText(
"Create a general trapezoid");
218 fShapeButton[5] =
new TGPictureButton(f1, fClient->GetPicture(
"geogtra_t.xpm"), kCREATE_GTRA);
219 fShapeButton[5]->SetToolTipText(
"Create a general twisted trapezoid");
220 for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict],lhb);
221 container->AddFrame(f1, lhf1);
222 f1 =
new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
223 fShapeButton[6] =
new TGPictureButton(f1, fClient->GetPicture(
"geoxtru_t.xpm"), kCREATE_XTRU);
224 fShapeButton[6]->SetToolTipText(
"Create a extruded polygone");
225 fShapeButton[7] =
new TGPictureButton(f1, fClient->GetPicture(
"geoarb8_t.xpm"), kCREATE_ARB8);
226 fShapeButton[7]->SetToolTipText(
"Create an arbitrary trapezoid with 8 vertices");
227 fShapeButton[8] =
new TGPictureButton(f1, fClient->GetPicture(
"geotube_t.xpm"), kCREATE_TUBE);
228 fShapeButton[8]->SetToolTipText(
"Create a cylindrical pipe");
229 fShapeButton[9] =
new TGPictureButton(f1, fClient->GetPicture(
"geotubeseg_t.xpm"), kCREATE_TUBS);
230 fShapeButton[9]->SetToolTipText(
"Create a cylindrical pipe within a phi range");
231 fShapeButton[10] =
new TGPictureButton(f1, fClient->GetPicture(
"geocone_t.xpm"), kCREATE_CONE);
232 fShapeButton[10]->SetToolTipText(
"Create a conical pipe");
233 fShapeButton[11] =
new TGPictureButton(f1, fClient->GetPicture(
"geoconeseg_t.xpm"), kCREATE_CONS);
234 fShapeButton[11]->SetToolTipText(
"Create a conical pipe within a phi range");
235 for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict+6],lhb);
236 container->AddFrame(f1, lhf1);
237 f1 =
new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
238 fShapeButton[12] =
new TGPictureButton(f1, fClient->GetPicture(
"geosphere_t.xpm"), kCREATE_SPHE);
239 fShapeButton[12]->SetToolTipText(
"Create a spherical sector");
240 fShapeButton[13] =
new TGPictureButton(f1, fClient->GetPicture(
"geoctub_t.xpm"), kCREATE_CTUB);
241 fShapeButton[13]->SetToolTipText(
"Create a cut tube");
242 fShapeButton[14] =
new TGPictureButton(f1, fClient->GetPicture(
"geoeltu_t.xpm"), kCREATE_ELTU);
243 fShapeButton[14]->SetToolTipText(
"Create an elliptical tube");
244 fShapeButton[15] =
new TGPictureButton(f1, fClient->GetPicture(
"geotorus_t.xpm"), kCREATE_TORUS);
245 fShapeButton[15]->SetToolTipText(
"Create a toroidal tube with a phi range");
246 fShapeButton[16] =
new TGPictureButton(f1, fClient->GetPicture(
"geopcon_t.xpm"), kCREATE_PCON);
247 fShapeButton[16]->SetToolTipText(
"Create a polycone shape");
248 fShapeButton[17] =
new TGPictureButton(f1, fClient->GetPicture(
"geopgon_t.xpm"), kCREATE_PGON);
249 fShapeButton[17]->SetToolTipText(
"Create a polygon shape");
250 for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict+12],lhb);
251 container->AddFrame(f1, lhf1);
252 f1 =
new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
253 fShapeButton[18] =
new TGPictureButton(f1, fClient->GetPicture(
"geohype_t.xpm"), kCREATE_HYPE);
254 fShapeButton[18]->SetToolTipText(
"Create a hyperboloid");
255 fShapeButton[19] =
new TGPictureButton(f1, fClient->GetPicture(
"geoparab_t.xpm"), kCREATE_PARAB);
256 fShapeButton[19]->SetToolTipText(
"Create a paraboloid");
257 fShapeButton[20] =
new TGPictureButton(f1, fClient->GetPicture(
"geocomposite_t.xpm"), kCREATE_COMP);
258 fShapeButton[20]->SetToolTipText(
"Create a composite shape");
259 for (ipict=0; ipict<3; ipict++) f1->AddFrame(fShapeButton[ipict+18],lhb);
260 container->AddFrame(f1, lhf1);
263 f2 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
264 f1 =
new TGCompositeFrame(f2, 155, 10, kHorizontalFrame | kFixedWidth);
265 f1->AddFrame(label =
new TGLabel(f1,
"Existing shapes"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
266 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
267 gClient->GetColorByName(
"#ff0000", color);
268 label->SetTextColor(color);
269 f2->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
270 f1 =
new TGCompositeFrame(f2, 155, 30, kHorizontalFrame | kFixedWidth);
272 fLSelShape =
new TGLabel(f1,
"Select shape");
273 gClient->GetColorByName(
"#0000ff", color);
274 fLSelShape->SetTextColor(color);
275 fLSelShape->ChangeOptions(kSunkenFrame | kDoubleBorder);
276 f1->AddFrame(fLSelShape,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
277 fBSelShape =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_SHAPE_SELECT);
278 fBSelShape->SetToolTipText(
"Select one of the existing shapes");
279 fBSelShape->Associate(
this);
280 f1->AddFrame(fBSelShape,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
281 fEditShape =
new TGTextButton(f1,
"Edit");
282 f1->AddFrame(fEditShape,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
283 fEditShape->SetToolTipText(
"Edit selected shape");
284 fEditShape->Associate(
this);
285 f2->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
286 container->AddFrame(f2,
new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
289 si =
new TGShutterItem(fCategories,
new TGHotString(
"Volumes"),kCAT_VOLUMES);
290 container = (TGCompositeFrame*)si->GetContainer();
291 container->SetBackgroundColor(GetDefaultFrameBackground());
292 fCategories->AddItem(si);
294 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
295 f1->AddFrame(label =
new TGLabel(f1,
"Create new volume"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
296 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
297 gClient->GetColorByName(
"#ff0000", color);
298 label->SetTextColor(color);
299 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
301 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
302 f1->AddFrame(
new TGLabel(f1,
"Name"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
303 fVolumeName =
new TGTextEntry(f1,
new TGTextBuffer(50), kVOLUME_NAME);
304 fVolumeName->Resize(100, fVolumeName->GetDefaultHeight());
305 fVolumeName->SetToolTipText(
"Enter the name for the new volume");
306 f1->AddFrame(fVolumeName,
new TGLayoutHints(kLHintsRight, 3, 1, 2, 5));
307 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
310 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
312 fLSelShape2 =
new TGLabel(f1,
"Select shape");
313 gClient->GetColorByName(
"#0000ff", color);
314 fLSelShape2->SetTextColor(color);
315 fLSelShape2->ChangeOptions(kSunkenFrame | kDoubleBorder);
316 f1->AddFrame(fLSelShape2,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
317 fBSelShape2 =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_SHAPE_SELECT2);
318 fBSelShape2->SetToolTipText(
"Select one of the existing shapes");
319 fBSelShape2->Associate(
this);
320 f1->AddFrame(fBSelShape2,
new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
321 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
324 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
325 fSelectedMedium2 = 0;
326 fLSelMedium2 =
new TGLabel(f1,
"Select medium");
327 gClient->GetColorByName(
"#0000ff", color);
328 fLSelMedium2->SetTextColor(color);
329 fLSelMedium2->ChangeOptions(kSunkenFrame | kDoubleBorder);
330 f1->AddFrame(fLSelMedium2,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
331 fBSelMedium2 =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_MEDIUM_SELECT2);
332 fBSelMedium2->SetToolTipText(
"Select one of the existing media");
333 fBSelMedium2->Associate(
this);
334 f1->AddFrame(fBSelMedium2,
new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
335 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
337 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
338 f1->AddFrame(
new TGLabel(f1,
"Create..."),
new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
339 fVolumeButton[0] =
new TGPictureButton(f1, fClient->GetPicture(
"geovolume_t.xpm"), kCREATE_VOLUME);
340 fVolumeButton[0]->SetToolTipText(
"Create a new volume from shape and medium");
341 fVolumeButton[1] =
new TGPictureButton(f1, fClient->GetPicture(
"geoassembly_t.xpm"), kCREATE_ASSEMBLY);
342 fVolumeButton[1]->SetToolTipText(
"Create a new volume assembly having the selected name");
343 for (ipict=0; ipict<2; ipict++) f1->AddFrame(fVolumeButton[ipict],lhb);
344 container->AddFrame(f1, lhf1);
346 f3 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
347 f1 =
new TGCompositeFrame(f3, 155, 10, kHorizontalFrame | kFixedWidth);
348 f1->AddFrame(label =
new TGLabel(f1,
"Existing volumes"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
349 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
350 gClient->GetColorByName(
"#ff0000", color);
351 label->SetTextColor(color);
352 f3->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
353 f1 =
new TGCompositeFrame(f3, 155, 30, kHorizontalFrame | kFixedWidth);
355 fLSelVolume =
new TGLabel(f1,
"Select volume");
356 gClient->GetColorByName(
"#0000ff", color);
357 fLSelVolume->SetTextColor(color);
358 fLSelVolume->ChangeOptions(kSunkenFrame | kDoubleBorder);
359 f1->AddFrame(fLSelVolume,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
360 fBSelVolume =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_VOLUME_SELECT);
361 fBSelVolume->SetToolTipText(
"Select one of the existing volumes");
362 fBSelVolume->Associate(
this);
363 f1->AddFrame(fBSelVolume,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
364 f3->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
365 f1 =
new TGCompositeFrame(f3, 155, 30, kHorizontalFrame | kFixedWidth);
366 fEditVolume =
new TGTextButton(f1,
" Edit ");
367 f1->AddFrame(fEditVolume,
new TGLayoutHints(kLHintsLeft, 20, 1, 2, 2));
368 fEditVolume->SetToolTipText(
"Edit selected volume");
369 fEditVolume->Associate(
this);
370 fSetTopVolume =
new TGTextButton(f1,
"Set top");
371 f1->AddFrame(fSetTopVolume,
new TGLayoutHints(kLHintsRight, 1, 20, 2, 2));
372 fSetTopVolume->SetToolTipText(
"Set top volume for geometry");
373 fSetTopVolume->Associate(
this);
374 f3->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
375 container->AddFrame(f3,
new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
378 si =
new TGShutterItem(fCategories,
new TGHotString(
"Materials"),kCAT_MATERIALS);
379 container = (TGCompositeFrame*)si->GetContainer();
380 container->SetBackgroundColor(GetDefaultFrameBackground());
381 fCategories->AddItem(si);
384 gGeoManager->BuildDefaultMaterials();
385 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
386 f1->AddFrame(label =
new TGLabel(f1,
"Create material/mixt."),
new TGLayoutHints(kLHintsLeft, 2, 1, 0, 0));
387 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
388 gClient->GetColorByName(
"#ff0000", color);
389 label->SetTextColor(color);
390 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
391 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
392 f1->AddFrame(
new TGLabel(f1,
"Name"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
393 fMaterialName =
new TGTextEntry(f1,
new TGTextBuffer(50), kMATERIAL_NAME);
394 fMaterialName->Resize(100, fMaterialName->GetDefaultHeight());
395 fMaterialName->SetToolTipText(
"Enter the new material name");
396 f1->AddFrame(fMaterialName,
new TGLayoutHints(kLHintsRight, 3, 1, 2, 5));
397 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
399 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
400 f1->AddFrame(
new TGLabel(f1,
"Element"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
401 fElementList =
new TGComboBox(f1, kMANAGER_ELEMENT_SELECT);
402 fElementList->Resize(100, fManagerName->GetDefaultHeight());
403 TGeoElementTable *table = gGeoManager->GetElementTable();
405 TGeoElement *element;
406 for (Int_t i=0; i<table->GetNelements(); i++) {
407 element = table->GetElement(i);
408 fElementList->AddEntry(element->GetTitle(),i);
411 fElementList->Select(0);
412 f1->AddFrame(fElementList,
new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
413 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
415 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
416 f1->AddFrame(
new TGLabel(f1,
"Density"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
417 fEntryDensity =
new TGNumberEntry(f1, 0., 5, kMANAGER_DENSITY_SELECT);
418 fEntryDensity->SetNumStyle(TGNumberFormat::kNESRealThree);
419 fEntryDensity->SetNumAttr(TGNumberFormat::kNEANonNegative);
420 fEntryDensity->Resize(100,fEntryDensity->GetDefaultHeight());
421 TGTextEntry *nef = (TGTextEntry*)fEntryDensity->GetNumberEntry();
422 nef->SetToolTipText(
"Enter material/mixture density");
423 fEntryDensity->SetNumber(0);
424 fEntryDensity->Associate(
this);
425 f1->AddFrame(fEntryDensity,
new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
426 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
429 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
430 f1->AddFrame(
new TGLabel(f1,
"Create..."),
new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
431 fMaterialButton[0] =
new TGPictureButton(f1, fClient->GetPicture(
"geomaterial_t.xpm"), kCREATE_MATERIAL);
432 fMaterialButton[0]->SetToolTipText(
"Create a new material from element and density");
433 fMaterialButton[1] =
new TGPictureButton(f1, fClient->GetPicture(
"geomixture_t.xpm"), kCREATE_MIXTURE);
434 fMaterialButton[1]->SetToolTipText(
"Create a new mixture with selected density");
435 for (ipict=0; ipict<2; ipict++) f1->AddFrame(fMaterialButton[ipict],lhb);
436 container->AddFrame(f1, lhf1);
439 f4 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
440 f1 =
new TGCompositeFrame(f4, 155, 10, kHorizontalFrame | kFixedWidth);
441 f1->AddFrame(label =
new TGLabel(f1,
"Existing materials"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
442 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
443 gClient->GetColorByName(
"#ff0000", color);
444 label->SetTextColor(color);
445 f4->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
446 f1 =
new TGCompositeFrame(f4, 155, 30, kHorizontalFrame | kFixedWidth);
447 fSelectedMaterial = 0;
448 fLSelMaterial =
new TGLabel(f1,
"Select material");
449 gClient->GetColorByName(
"#0000ff", color);
450 fLSelMaterial->SetTextColor(color);
451 fLSelMaterial->ChangeOptions(kSunkenFrame | kDoubleBorder);
452 f1->AddFrame(fLSelMaterial,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
453 fBSelMaterial =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_MATERIAL_SELECT);
454 fBSelMaterial->SetToolTipText(
"Select one of the existing materials");
455 fBSelMaterial->Associate(
this);
456 f1->AddFrame(fBSelMaterial,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
457 fEditMaterial =
new TGTextButton(f1,
"Edit");
458 f1->AddFrame(fEditMaterial,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
459 fEditMaterial->SetToolTipText(
"Edit selected material");
460 fEditMaterial->Associate(
this);
461 f4->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
462 container->AddFrame(f4,
new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
464 si =
new TGShutterItem(fCategories,
new TGHotString(
"Media"),kCAT_MEDIA);
465 container = (TGCompositeFrame*)si->GetContainer();
466 container->SetBackgroundColor(GetDefaultFrameBackground());
467 fCategories->AddItem(si);
470 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
471 f1->AddFrame(label =
new TGLabel(f1,
"Create new medium"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
472 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
473 gClient->GetColorByName(
"#ff0000", color);
474 label->SetTextColor(color);
475 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
477 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
478 f1->AddFrame(
new TGLabel(f1,
"Name"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
479 fMediumName =
new TGTextEntry(f1,
new TGTextBuffer(50), kMEDIUM_NAME);
480 fMediumName->Resize(60, fMediumName->GetDefaultHeight());
481 fMediumName->SetToolTipText(
"Enter the new medium name");
482 f1->AddFrame(fMediumName,
new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
484 fMediumId =
new TGNumberEntry(f1, 0., 5, kMEDIUM_ID);
485 fMediumId->SetNumStyle(TGNumberFormat::kNESInteger);
486 fMediumId->SetNumAttr(TGNumberFormat::kNEAPositive);
487 fMediumId->Resize(35,fMediumId->GetDefaultHeight());
488 nef = (TGTextEntry*)fMediumId->GetNumberEntry();
489 nef->SetToolTipText(
"Enter medium ID");
490 fMediumId->SetNumber(fGeometry->GetListOfMedia()->GetSize());
491 fMediumId->Associate(
this);
492 f1->AddFrame(fMediumId,
new TGLayoutHints(kLHintsRight, 2, 2, 2 ,2));
493 f1->AddFrame(
new TGLabel(f1,
"ID"),
new TGLayoutHints(kLHintsRight, 1, 1, 6, 0));
494 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
496 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
497 fSelectedMaterial2 = 0;
498 fLSelMaterial2 =
new TGLabel(f1,
"Select material");
499 gClient->GetColorByName(
"#0000ff", color);
500 fLSelMaterial2->SetTextColor(color);
501 fLSelMaterial2->ChangeOptions(kSunkenFrame | kDoubleBorder);
502 f1->AddFrame(fLSelMaterial2,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
503 fBSelMaterial2 =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_MATERIAL_SELECT2);
504 fBSelMaterial2->SetToolTipText(
"Select one of the existing materials");
505 fBSelMaterial2->Associate(
this);
506 f1->AddFrame(fBSelMaterial2,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
507 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
508 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
509 f1->AddFrame(
new TGLabel(f1,
"Create..."),
new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
510 fMediumButton =
new TGPictureButton(f1, fClient->GetPicture(
"geomedium_t.xpm"), kCREATE_MEDIUM);
511 fMediumButton->SetToolTipText(
"Create a new medium from selected material");
512 fMediumButton->Associate(
this);
513 f1->AddFrame(fMediumButton,
new TGLayoutHints(kLHintsLeft, 5, 2, 2, 2));
514 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
517 f5 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
518 f1 =
new TGCompositeFrame(f5, 145, 10, kHorizontalFrame | kLHintsExpandX | kFixedWidth | kOwnBackground);
519 f1->AddFrame(label =
new TGLabel(f1,
"Existing media"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
520 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
521 gClient->GetColorByName(
"#ff0000", color);
522 label->SetTextColor(color);
523 f5->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
524 f1 =
new TGCompositeFrame(f5, 155, 30, kHorizontalFrame | kFixedWidth);
526 fLSelMedium =
new TGLabel(f1,
"Select medium");
527 gClient->GetColorByName(
"#0000ff", color);
528 fLSelMedium->SetTextColor(color);
529 fLSelMedium->ChangeOptions(kSunkenFrame | kDoubleBorder);
530 f1->AddFrame(fLSelMedium,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
531 fBSelMedium =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_MEDIA_SELECT);
532 fBSelMedium->SetToolTipText(
"Select one of the existing media");
533 fBSelMedium->Associate(
this);
534 f1->AddFrame(fBSelMedium,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
535 fEditMedium =
new TGTextButton(f1,
"Edit");
536 f1->AddFrame(fEditMedium,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
537 fEditMedium->SetToolTipText(
"Edit selected medium");
538 fEditMedium->Associate(
this);
539 f5->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
540 container->AddFrame(f5,
new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
543 si =
new TGShutterItem(fCategories,
new TGHotString(
"Matrices"),kCAT_MATRICES);
544 container = (TGCompositeFrame*)si->GetContainer();
545 container->SetBackgroundColor(GetDefaultFrameBackground());
546 fCategories->AddItem(si);
548 f1 =
new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
549 f1->AddFrame(label =
new TGLabel(f1,
"Create new matrix"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
550 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
551 gClient->GetColorByName(
"#ff0000", color);
552 label->SetTextColor(color);
553 container->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
555 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
556 f1->AddFrame(
new TGLabel(f1,
"Name"),
new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
557 fMatrixName =
new TGTextEntry(f1,
new TGTextBuffer(50), kMATRIX_NAME);
558 fMatrixName->Resize(100, fMatrixName->GetDefaultHeight());
559 fMatrixName->SetToolTipText(
"Enter the new matrix name");
560 f1->AddFrame(fMatrixName,
new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
561 container->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
563 f1 =
new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
564 f1->AddFrame(
new TGLabel(f1,
"Create..."),
new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
565 fMatrixButton[0] =
new TGPictureButton(f1, fClient->GetPicture(
"geotranslation_t.xpm"), kCREATE_TRANSLATION);
566 fMatrixButton[0]->SetToolTipText(
"Create a translation");
567 fMatrixButton[1] =
new TGPictureButton(f1, fClient->GetPicture(
"georotation_t.xpm"), kCREATE_ROTATION);
568 fMatrixButton[1]->SetToolTipText(
"Create a rotation");
569 fMatrixButton[2] =
new TGPictureButton(f1, fClient->GetPicture(
"geocombi_t.xpm"), kCREATE_COMBI);
570 fMatrixButton[2]->SetToolTipText(
"Create a rotation + translation");
571 for (ipict=0; ipict<3; ipict++) f1->AddFrame(fMatrixButton[ipict],lhb);
572 container->AddFrame(f1, lhf1);
574 f6 =
new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
575 f1 =
new TGCompositeFrame(f6, 155, 10, kHorizontalFrame | kFixedWidth);
576 f1->AddFrame(label =
new TGLabel(f1,
"Existing matrices"),
new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
577 f1->AddFrame(
new TGHorizontal3DLine(f1),
new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
578 gClient->GetColorByName(
"#ff0000", color);
579 label->SetTextColor(color);
580 f6->AddFrame(f1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
581 f1 =
new TGCompositeFrame(f6, 155, 30, kHorizontalFrame | kFixedWidth);
583 fLSelMatrix =
new TGLabel(f1,
"Select matrix");
584 gClient->GetColorByName(
"#0000ff", color);
585 fLSelMatrix->SetTextColor(color);
586 fLSelMatrix->ChangeOptions(kSunkenFrame | kDoubleBorder);
587 f1->AddFrame(fLSelMatrix,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
588 fBSelMatrix =
new TGPictureButton(f1, fClient->GetPicture(
"rootdb_t.xpm"), kMANAGER_MATRIX_SELECT);
589 fBSelMatrix->SetToolTipText(
"Select one of the existing matrices");
590 fBSelMatrix->Associate(
this);
591 f1->AddFrame(fBSelMatrix,
new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
592 fEditMatrix =
new TGTextButton(f1,
"Edit");
593 f1->AddFrame(fEditMatrix,
new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
594 fEditMatrix->SetToolTipText(
"Edit selected matrix");
595 fEditMatrix->Associate(
this);
596 f6->AddFrame(f1,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
597 container->AddFrame(f6,
new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
599 fCategories->Resize(163,370);
600 AddFrame(fCategories,
new TGLayoutHints(kLHintsLeft, 0, 0, 4, 4));
602 fVolumeTab = CreateEditorTabSubFrame(
"Volume");
605 fTab = fGedEditor->GetTab();
606 TCanvas* edCanvas = fGedEditor->GetCanvas();
607 fGedEditor->DisconnectFromCanvas();
608 if (edCanvas != fConnectedCanvas) {
609 DisconnectSelected();
611 ConnectSelected(edCanvas);
612 fConnectedCanvas = edCanvas;
619 TGeoManagerEditor::~TGeoManagerEditor()
621 TGCompositeFrame *cont;
622 cont = (TGCompositeFrame*)fCategories->GetItem(
"General")->GetContainer();
623 TGeoTabManager::Cleanup(cont);
624 fCategories->GetItem(
"General")->SetCleanup(0);
625 cont = (TGCompositeFrame*)fCategories->GetItem(
"Shapes")->GetContainer();
626 TGeoTabManager::Cleanup(cont);
627 fCategories->GetItem(
"Shapes")->SetCleanup(0);
628 cont = (TGCompositeFrame*)fCategories->GetItem(
"Volumes")->GetContainer();
629 TGeoTabManager::Cleanup(cont);
630 fCategories->GetItem(
"Volumes")->SetCleanup(0);
631 cont = (TGCompositeFrame*)fCategories->GetItem(
"Materials")->GetContainer();
632 TGeoTabManager::Cleanup(cont);
633 fCategories->GetItem(
"Materials")->SetCleanup(0);
634 cont = (TGCompositeFrame*)fCategories->GetItem(
"Media")->GetContainer();
635 TGeoTabManager::Cleanup(cont);
636 fCategories->GetItem(
"Media")->SetCleanup(0);
637 cont = (TGCompositeFrame*)fCategories->GetItem(
"Matrices")->GetContainer();
638 TGeoTabManager::Cleanup(cont);
639 fCategories->GetItem(
"Matrices")->SetCleanup(0);
641 delete fExportOption[0];
delete fExportOption[1];
646 fTabMgr->GetVolumeTab()->Cleanup();
655 void TGeoManagerEditor::SelectedSlot(TVirtualPad* , TObject* obj, Int_t event)
657 if (event == kButton1 && obj->InheritsFrom(TGeoVolume::Class())) {
658 TGeoVolume* v = (TGeoVolume*) obj;
659 fTabMgr->SetVolTabEnabled();
661 fTabMgr->GetVolumeEditor(v);
666 void TGeoManagerEditor::ConnectSelected(TCanvas *c)
670 c->Connect(
"Selected(TVirtualPad*,TObject*,Int_t)",
"TGeoManagerEditor",
671 this,
"SelectedSlot(TVirtualPad*,TObject*,Int_t)");
674 void TGeoManagerEditor::DisconnectSelected()
678 if (fConnectedCanvas)
679 Disconnect(fConnectedCanvas,
"Selected(TVirtualPad*,TObject*,Int_t)",
680 this,
"SelectedSlot(TVirtualPad*,TObject*,Int_t)");
687 void TGeoManagerEditor::ConnectSignals2Slots()
689 fManagerName->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
690 fManagerTitle->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
691 fExportButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoExportGeometry()");
692 fCloseGeometry->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCloseGeometry()");
693 fShapeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateBox()");
694 fShapeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePara()");
695 fShapeButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd1()");
696 fShapeButton[3]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd2()");
697 fShapeButton[4]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrap()");
698 fShapeButton[5]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateGtra()");
699 fShapeButton[6]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateXtru()");
700 fShapeButton[7]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateArb8()");
701 fShapeButton[8]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTube()");
702 fShapeButton[9]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTubs()");
703 fShapeButton[10]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCone()");
704 fShapeButton[11]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCons()");
705 fShapeButton[12]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateSphe()");
706 fShapeButton[13]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCtub()");
707 fShapeButton[14]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateEltu()");
708 fShapeButton[15]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTorus()");
709 fShapeButton[16]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePcon()");
710 fShapeButton[17]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePgon()");
711 fShapeButton[18]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateHype()");
712 fShapeButton[19]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateParab()");
713 fShapeButton[20]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateComposite()");
714 fMatrixButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTranslation()");
715 fMatrixButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateRotation()");
716 fMatrixButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCombi()");
717 fVolumeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateVolume()");
718 fVolumeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateAssembly()");
719 fBSelTop->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectTopVolume()");
720 fBSelVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectVolume()");
721 fBSelShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape()");
722 fBSelShape2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape2()");
723 fBSelMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMatrix()");
724 fBSelMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial()");
725 fBSelMaterial2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial2()");
726 fBSelMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium()");
727 fBSelMedium2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium2()");
728 fSetTopVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSetTopVolume()");
729 fEditShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditShape()");
730 fEditMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMedium()");
731 fEditMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMaterial()");
732 fEditMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMatrix()");
733 fEditVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditVolume()");
735 fMaterialButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMaterial()");
736 fMaterialButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMixture()");
737 fMediumButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMedium()");
743 void TGeoManagerEditor::SetModel(TObject* obj)
745 fGeometry = (TGeoManager*)obj;
746 fManagerName->SetText(fGeometry->GetName());
747 fManagerTitle->SetText(fGeometry->GetTitle());
748 fMatrixName->SetText(TString::Format(
"matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
749 fMaterialName->SetText(TString::Format(
"material%i", fGeometry->GetListOfMaterials()->GetSize()));
750 fMediumName->SetText(TString::Format(
"medium%i", fGeometry->GetListOfMedia()->GetSize()));
751 fVolumeName->SetText(TString::Format(
"volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
753 if (fGeometry->GetMasterVolume()) fSetTopVolume->SetEnabled(kFALSE);
754 else fSetTopVolume->SetEnabled(kTRUE);
756 if (!fGeometry->IsClosed()) fCloseGeometry->SetEnabled(kTRUE);
758 fCloseGeometry->SetEnabled(kFALSE);
759 fBSelTop->SetEnabled(kFALSE);
762 if (!fGeometry->GetListOfShapes()->GetEntries() || !fGeometry->GetListOfMedia()->GetSize())
763 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kFALSE);
765 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
766 if (!fGeometry->GetListOfShapes()->GetEntries()) ShowSelectShape(kFALSE);
767 else ShowSelectShape();
768 if (!fGeometry->GetListOfVolumes()->GetEntries()) ShowSelectVolume(kFALSE);
769 else ShowSelectVolume();
770 if (!fGeometry->GetListOfMedia()->GetSize()) ShowSelectMedium(kFALSE);
771 else ShowSelectMedium();
772 if (!fGeometry->GetListOfMatrices()->GetEntries()) ShowSelectMatrix(kFALSE);
773 else ShowSelectMatrix();
776 if (!fGeometry->GetListOfMaterials()->GetSize()) {
777 fCategories->GetItem(
"Media")->GetButton()->SetEnabled(kFALSE);
778 ShowSelectMaterial(kFALSE);
780 fCategories->GetItem(
"Media")->GetButton()->SetEnabled(kTRUE);
781 ShowSelectMaterial();
785 fCategories->Layout();
787 fTabMgr = TGeoTabManager::GetMakeTabManager(fGedEditor);
788 fTabMgr->fVolumeTab = fVolumeTab;
790 if (fInit) ConnectSignals2Slots();
797 void TGeoManagerEditor::DoName()
799 fGeometry->SetName(fManagerName->GetText());
800 fGeometry->SetTitle(fManagerTitle->GetText());
806 void TGeoManagerEditor::DoExportGeometry()
808 Bool_t asroot = fExportOption[0]->IsDown();
809 TString s = fGeometry->GetName();
813 if (asroot) name = TString::Format(
"%s.root", s.Data());
814 else name = TString::Format(
"%s.C", s.Data());
815 fGeometry->Export(name);
821 void TGeoManagerEditor::DoCreateBox()
823 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
824 fSelectedShape =
new TGeoBBox(TString::Format(
"box_%i",
id), 1., 1., 1.);
827 if (fGeometry->GetListOfMedia()->GetSize())
828 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
835 void TGeoManagerEditor::DoCreatePara()
837 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
838 fSelectedShape =
new TGeoPara(TString::Format(
"para_%i",
id), 1., 1., 1., 30., 20., 45.);
840 if (fGeometry->GetListOfMedia()->GetSize())
841 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
848 void TGeoManagerEditor::DoCreateTrd1()
850 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
851 fSelectedShape =
new TGeoTrd1(TString::Format(
"trd1_%i",
id), 0.5, 1., 1., 1.);
853 if (fGeometry->GetListOfMedia()->GetSize())
854 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
861 void TGeoManagerEditor::DoCreateTrd2()
863 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
864 fSelectedShape =
new TGeoTrd2(TString::Format(
"trd2_%i",
id), 0.5, 1., 0.5, 1., 1.);
866 if (fGeometry->GetListOfMedia()->GetSize())
867 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
874 void TGeoManagerEditor::DoCreateTrap()
876 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
877 fSelectedShape =
new TGeoTrap(TString::Format(
"trap_%i",
id), 1., 15., 45., 0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
879 if (fGeometry->GetListOfMedia()->GetSize())
880 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
887 void TGeoManagerEditor::DoCreateGtra()
889 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
890 fSelectedShape =
new TGeoGtra(TString::Format(
"gtra_%i",
id), 1., 15., 45., 45.,0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
892 if (fGeometry->GetListOfMedia()->GetSize())
893 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
900 void TGeoManagerEditor::DoCreateXtru()
908 void TGeoManagerEditor::DoCreateArb8()
915 void TGeoManagerEditor::DoCreateTube()
917 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
918 fSelectedShape =
new TGeoTube(TString::Format(
"tube_%i",
id), 0.5, 1., 1.);
920 if (fGeometry->GetListOfMedia()->GetSize())
921 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
928 void TGeoManagerEditor::DoCreateTubs()
930 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
931 fSelectedShape =
new TGeoTubeSeg(TString::Format(
"tubs_%i",
id), 0.5, 1., 1.,0.,45.);
933 if (fGeometry->GetListOfMedia()->GetSize())
934 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
941 void TGeoManagerEditor::DoCreateCone()
943 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
944 fSelectedShape =
new TGeoCone(TString::Format(
"cone_%i",
id), 0.5, 0.5, 1., 1.5, 2.);
946 if (fGeometry->GetListOfMedia()->GetSize())
947 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
954 void TGeoManagerEditor::DoCreateCons()
956 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
957 fSelectedShape =
new TGeoConeSeg(TString::Format(
"cons_%i",
id), 0.5, 0.5, 1., 1.5, 2.,0.,45.);
959 if (fGeometry->GetListOfMedia()->GetSize())
960 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
967 void TGeoManagerEditor::DoCreateSphe()
969 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
970 fSelectedShape =
new TGeoSphere(TString::Format(
"sphere_%i",
id), 0.5, 1., 0., 180., 0.,360.);
972 if (fGeometry->GetListOfMedia()->GetSize())
973 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
980 void TGeoManagerEditor::DoCreateCtub()
982 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
983 fSelectedShape =
new TGeoCtub(TString::Format(
"ctub_%i",
id), 0.5, 1., 1.,0.,45.,0.,0.,-1,0.,0.,1);
985 if (fGeometry->GetListOfMedia()->GetSize())
986 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
993 void TGeoManagerEditor::DoCreateEltu()
995 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
996 fSelectedShape =
new TGeoEltu(TString::Format(
"para_%i",
id), 1., 2., 1.5 );
998 if (fGeometry->GetListOfMedia()->GetSize())
999 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1006 void TGeoManagerEditor::DoCreateTorus()
1008 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
1009 fSelectedShape =
new TGeoTorus(TString::Format(
"torus_%i",
id), 10., 1., 1.5, 0, 360.);
1011 if (fGeometry->GetListOfMedia()->GetSize())
1012 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1020 void TGeoManagerEditor::DoCreatePcon()
1022 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
1023 fSelectedShape =
new TGeoPcon(TString::Format(
"pcon_%i",
id), 0., 360., 2);
1024 ((TGeoPcon*)fSelectedShape)->DefineSection(0, -1, 0.5, 1.);
1025 ((TGeoPcon*)fSelectedShape)->DefineSection(1, 1, 0.2, 0.5);
1027 if (fGeometry->GetListOfMedia()->GetSize())
1028 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1035 void TGeoManagerEditor::DoCreatePgon()
1037 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
1038 fSelectedShape =
new TGeoPgon(TString::Format(
"pgon_%i",
id), 0., 360.,6,2);
1039 ((TGeoPcon*)fSelectedShape)->DefineSection(0, -1, 0.5, 1.);
1040 ((TGeoPcon*)fSelectedShape)->DefineSection(1, 1, 0.2, 0.5);
1042 if (fGeometry->GetListOfMedia()->GetSize())
1043 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1050 void TGeoManagerEditor::DoCreateHype()
1052 Int_t
id = gGeoManager->GetListOfShapes()->GetEntries();
1053 fSelectedShape =
new TGeoHype(TString::Format(
"hype_%i",
id), 1., 15., 2., 30., 5.);
1055 if (fGeometry->GetListOfMedia()->GetSize())
1056 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1063 void TGeoManagerEditor::DoCreateParab()
1070 void TGeoManagerEditor::DoCreateComposite()
1077 void TGeoManagerEditor::DoCreateMaterial()
1079 TGeoElement *el = fGeometry->GetElementTable()->GetElement(fElementList->GetSelected());
1081 Error(
"DoCreateMaterial",
"Cannot find selected element in list");
1084 Double_t density = fEntryDensity->GetNumber();
1085 const char *name = fMaterialName->GetText();
1086 fSelectedMaterial =
new TGeoMaterial(name, el, density);
1087 ShowSelectMaterial();
1088 fCategories->GetItem(
"Media")->GetButton()->SetEnabled(kTRUE);
1090 fMaterialName->SetText(TString::Format(
"material%i", fGeometry->GetListOfMaterials()->GetSize()));
1096 void TGeoManagerEditor::DoCreateMixture()
1098 Double_t density = fEntryDensity->GetNumber();
1099 const char *name = fMaterialName->GetText();
1100 fSelectedMaterial =
new TGeoMixture(name, 1, density);
1101 ShowSelectMaterial();
1102 fCategories->GetItem(
"Media")->GetButton()->SetEnabled(kTRUE);
1104 fMaterialName->SetText(TString::Format(
"material%i", fGeometry->GetListOfMaterials()->GetSize()));
1110 void TGeoManagerEditor::DoCreateMedium()
1112 Int_t
id = fMediumId->GetIntNumber();
1113 if (!fSelectedMaterial2)
return;
1114 const char *name = fMediumName->GetText();
1115 fSelectedMedium =
new TGeoMedium(name,
id, fSelectedMaterial2);
1117 if (fGeometry->GetListOfShapes()->GetEntries())
1118 fCategories->GetItem(
"Volumes")->GetButton()->SetEnabled(kTRUE);
1120 fMediumName->SetText(TString::Format(
"medium%i", fGeometry->GetListOfMedia()->GetSize()));
1126 void TGeoManagerEditor::DoCreateTranslation()
1128 const char *name = fMatrixName->GetText();
1129 fSelectedMatrix =
new TGeoTranslation(name, 0., 0., 0.);
1130 fSelectedMatrix->SetBit(TGeoMatrix::kGeoTranslation);
1131 fSelectedMatrix->RegisterYourself();
1134 fMatrixName->SetText(TString::Format(
"matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
1140 void TGeoManagerEditor::DoCreateRotation()
1142 const char *name = fMatrixName->GetText();
1143 fSelectedMatrix =
new TGeoRotation(name);
1144 fSelectedMatrix->SetBit(TGeoMatrix::kGeoRotation);
1145 fSelectedMatrix->RegisterYourself();
1148 fMatrixName->SetText(TString::Format(
"matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
1154 void TGeoManagerEditor::DoCreateVolume()
1156 const char *name = fVolumeName->GetText();
1157 if (!fSelectedShape2 || !fSelectedMedium2)
return;
1158 fSelectedVolume =
new TGeoVolume(name, fSelectedShape2, fSelectedMedium2);
1159 fLSelVolume->SetText(name);
1162 fVolumeName->SetText(TString::Format(
"volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
1168 void TGeoManagerEditor::DoCreateAssembly()
1170 const char *name = fVolumeName->GetText();
1171 fSelectedVolume =
new TGeoVolumeAssembly(name);
1172 fLSelVolume->SetText(name);
1175 fVolumeName->SetText(TString::Format(
"volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
1181 void TGeoManagerEditor::DoCreateCombi()
1183 const char *name = fMatrixName->GetText();
1184 fSelectedMatrix =
new TGeoCombiTrans(name, 0., 0., 0.,
new TGeoRotation());
1185 fSelectedMatrix->RegisterYourself();
1186 fSelectedMatrix->SetBit(TGeoMatrix::kGeoTranslation);
1187 fSelectedMatrix->SetBit(TGeoMatrix::kGeoRotation);
1190 fMatrixName->SetText(TString::Format(
"matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
1196 void TGeoManagerEditor::DoSetTopVolume()
1198 if (!fSelectedVolume)
return;
1199 fGeometry->SetTopVolume(fSelectedVolume);
1200 fSetTopVolume->SetEnabled(kFALSE);
1206 void TGeoManagerEditor::DoEditShape()
1208 if (!fSelectedShape)
return;
1209 fTabMgr->GetShapeEditor(fSelectedShape);
1210 fSelectedShape->Draw();
1211 fTabMgr->GetPad()->GetView()->ShowAxis();
1217 void TGeoManagerEditor::DoEditVolume()
1219 if (!fSelectedVolume) {
1220 fTabMgr->SetVolTabEnabled(kFALSE);
1223 fTabMgr->SetVolTabEnabled();
1225 fTabMgr->GetVolumeEditor(fSelectedVolume);
1226 fSelectedVolume->Draw();
1232 void TGeoManagerEditor::DoEditMedium()
1234 if (!fSelectedMedium)
return;
1235 fTabMgr->GetMediumEditor(fSelectedMedium);
1241 void TGeoManagerEditor::DoEditMaterial()
1243 if (!fSelectedMaterial)
return;
1244 fTabMgr->GetMaterialEditor(fSelectedMaterial);
1250 void TGeoManagerEditor::DoEditMatrix()
1252 if (!fSelectedMatrix)
return;
1253 fTabMgr->GetMatrixEditor(fSelectedMatrix);
1259 void TGeoManagerEditor::DoSelectMatrix()
1261 TGeoMatrix *matrix = fSelectedMatrix;
1262 new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
1263 fSelectedMatrix = (TGeoMatrix*)TGeoMatrixDialog::GetSelected();
1264 if (fSelectedMatrix) fLSelMatrix->SetText(fSelectedMatrix->GetName());
1265 else fSelectedMatrix = matrix;
1271 void TGeoManagerEditor::DoSelectShape()
1273 TGeoShape *shape = fSelectedShape;
1274 new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
1275 fSelectedShape = (TGeoShape*)TGeoShapeDialog::GetSelected();
1276 if (fSelectedShape) fLSelShape->SetText(fSelectedShape->GetName());
1277 else fSelectedShape = shape;
1283 void TGeoManagerEditor::DoSelectShape2()
1285 TGeoShape *shape = fSelectedShape2;
1286 new TGeoShapeDialog(fBSelShape2, gClient->GetRoot(), 200,300);
1287 fSelectedShape2 = (TGeoShape*)TGeoShapeDialog::GetSelected();
1288 if (fSelectedShape2) fLSelShape2->SetText(fSelectedShape2->GetName());
1289 else fSelectedShape2 = shape;
1295 void TGeoManagerEditor::DoSelectMaterial()
1297 TGeoMaterial *mat = fSelectedMaterial;
1298 new TGeoMaterialDialog(fBSelMaterial, gClient->GetRoot(), 200,300);
1299 fSelectedMaterial = (TGeoMaterial*)TGeoMaterialDialog::GetSelected();
1300 if (fSelectedMaterial) fLSelMaterial->SetText(fSelectedMaterial->GetName());
1301 else fSelectedMaterial = mat;
1307 void TGeoManagerEditor::DoSelectMaterial2()
1309 TGeoMaterial *mat = fSelectedMaterial2;
1310 new TGeoMaterialDialog(fBSelMaterial2, gClient->GetRoot(), 200,300);
1311 fSelectedMaterial2 = (TGeoMaterial*)TGeoMaterialDialog::GetSelected();
1312 if (fSelectedMaterial2) fLSelMaterial2->SetText(fSelectedMaterial2->GetName());
1313 else fSelectedMaterial2 = mat;
1319 void TGeoManagerEditor::DoSelectMedium()
1321 TGeoMedium *med = fSelectedMedium;
1322 new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
1323 fSelectedMedium = (TGeoMedium*)TGeoMediumDialog::GetSelected();
1324 if (fSelectedMedium) fLSelMedium->SetText(fSelectedMedium->GetName());
1325 else fSelectedMedium = med;
1331 void TGeoManagerEditor::DoSelectMedium2()
1333 TGeoMedium *med = fSelectedMedium2;
1334 new TGeoMediumDialog(fBSelMedium2, gClient->GetRoot(), 200,300);
1335 fSelectedMedium2 = (TGeoMedium*)TGeoMediumDialog::GetSelected();
1336 if (fSelectedMedium2) fLSelMedium2->SetText(fSelectedMedium2->GetName());
1337 else fSelectedMedium2 = med;
1343 void TGeoManagerEditor::DoSelectVolume()
1345 TGeoVolume *vol = fSelectedVolume;
1346 new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
1347 fSelectedVolume = (TGeoVolume*)TGeoVolumeDialog::GetSelected();
1348 if (fSelectedVolume) fLSelVolume->SetText(fSelectedVolume->GetName());
1349 else fSelectedVolume = vol;
1355 void TGeoManagerEditor::DoSelectTopVolume()
1357 TGeoVolume *vol = fGeometry->GetTopVolume();
1358 new TGeoVolumeDialog(fBSelTop, gClient->GetRoot(), 200,300);
1359 fSelectedVolume = (TGeoVolume*)TGeoVolumeDialog::GetSelected();
1360 if (fSelectedVolume) fLSelTop->SetText(fSelectedVolume->GetName());
1361 else fSelectedVolume = vol;
1362 if (fSelectedVolume && (fSelectedVolume != vol)) fGeometry->SetTopVolume(fSelectedVolume);
1368 void TGeoManagerEditor::DoCloseGeometry()
1370 if (!fGeometry->IsClosed()) fGeometry->CloseGeometry();
1371 fCloseGeometry->SetEnabled(kFALSE);
1377 void TGeoManagerEditor::ShowSelectShape(Bool_t show)
1379 TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem(
"Shapes")->GetContainer();
1380 if (show) cont->ShowFrame(f2);
1381 else cont->HideFrame(f2);
1387 void TGeoManagerEditor::ShowSelectVolume(Bool_t show)
1389 TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem(
"General")->GetContainer();
1390 if (show) cont->ShowFrame(f7);
1391 else cont->HideFrame(f7);
1392 cont = (TGCompositeFrame*)fCategories->GetItem(
"Volumes")->GetContainer();
1393 if (show) cont->ShowFrame(f3);
1394 else cont->HideFrame(f3);
1400 void TGeoManagerEditor::ShowSelectMaterial(Bool_t show)
1402 TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem(
"Materials")->GetContainer();
1403 if (show) cont->ShowFrame(f4);
1404 else cont->HideFrame(f4);
1410 void TGeoManagerEditor::ShowSelectMedium(Bool_t show)
1412 TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem(
"Media")->GetContainer();
1413 if (show) cont->ShowFrame(f5);
1414 else cont->HideFrame(f5);
1420 void TGeoManagerEditor::ShowSelectMatrix(Bool_t show)
1422 TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem(
"Matrices")->GetContainer();
1423 if (show) cont->ShowFrame(f6);
1424 else cont->HideFrame(f6);