Logo ROOT   6.12/07
Reference Guide
TGeoVolumeEditor.cxx
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 /** \class TGeoVolumeEditor
13 \ingroup Geometry_builder
14 
15 Editor for geometry volumes and assemblies of volumes. Besides the volume
16 name and line attributes, a TGeoVolume has the following editable categories
17 split vertically by a shutter:
18 
19  - Properties: one can edit the shape and medium components from here. It is
20  also possible to change the existing ones.
21  - Daughters: the main category allowing defining, editing, removing or
22  positioning daughter volumes inside the current edited volume. To add a
23  daughter, one needs to select first a volume and a matrix. Currently no check
24  is performed if the daughter volume creates an extrusion (illegal for tracking).
25  To remove or change the position of an existing daughter, one should simply
26  select the desired daughter from the combo box with the existing ones, then
27  simply click the appropriate button.
28  - Visualization: One can set the visibility of the volume and of its daughters,
29  set the visibility depth and the view type. Selecting "All" will draw the
30  volume and all visible daughters down to the selected level starting from the
31  edited volume. Selecting "Leaves" will draw just the deepest daughters within
32  the selected visibility level, without displaying the containers, while "Only"
33  will just draw the edited volume.
34  - Division: The category becomes active only if there are no daughters of the
35  edited volume added by normal positioning (e.g. from <Daughters> category). The
36  minimum allowed starting value for the selected division axis is automatically
37  selected, while the slicing step is set to 0 - meaning that only the number
38  of slices matter.
39 */
40 
41 #include "TGeoVolumeEditor.h"
42 #include "TGeoVolume.h"
43 #include "TGeoPatternFinder.h"
44 #include "TGeoManager.h"
45 #include "TGeoMatrix.h"
46 #include "TVirtualPad.h"
47 #include "TBaseClass.h"
48 #include "TGTab.h"
49 #include "TGComboBox.h"
50 #include "TGButton.h"
51 #include "TGButtonGroup.h"
52 #include "TGTextEntry.h"
53 #include "TGNumberEntry.h"
54 #include "TGLabel.h"
55 #include "TGShutter.h"
56 #include "TG3DLine.h"
57 #include "TGeoTabManager.h"
58 #include "TGedEditor.h"
59 
61 
68 };
69 
70 ////////////////////////////////////////////////////////////////////////////////
71 /// Constructor for volume editor.
72 
74  Int_t height, UInt_t options, Pixel_t back)
75  : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
76 {
77  fGeometry = 0;
78  fVolume = 0;
79 
83 
84  // TGShutter for categories
85  fCategories = new TGShutter(this, kSunkenFrame);
86  TGCompositeFrame *container, *f1;
87  Pixel_t color;
88  TGLabel *label;
89 
90  // General settings
91  TGShutterItem *si = new TGShutterItem(fCategories, new TGHotString("Properties"),kCAT_GENERAL);
92  container = (TGCompositeFrame*)si->GetContainer();
94  fCategories->AddItem(si);
95 
96  // TextEntry for volume name
97  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
98  f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
99  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
100  gClient->GetColorByName("#ff0000", color);
101  label->SetTextColor(color);
102  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
103  fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
105  fVolumeName->SetToolTipText("Enter the volume name");
106  container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
107 
108  // Current shape
109  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
110  f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
111  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
112  gClient->GetColorByName("#ff0000", color);
113  label->SetTextColor(color);
114  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
115  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
116  fSelectedShape = 0;
117  fLSelShape = new TGLabel(f1, "Select shape");
118  gClient->GetColorByName("#0000ff", color);
119  fLSelShape->SetTextColor(color);
122  fBSelShape = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_SHAPE_SELECT);
123  fBSelShape->SetToolTipText("Replace with one of the existing shapes");
124  fBSelShape->Associate(this);
125  f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
126  fEditShape = new TGTextButton(f1, "Edit");
127  f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
128  fEditShape->SetToolTipText("Edit selected shape");
129  fEditShape->Associate(this);
130  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
131 
132  // Current medium
133  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
134  fSelectedMedium = 0;
135  fLSelMedium = new TGLabel(f1, "Select medium");
136  gClient->GetColorByName("#0000ff", color);
137  fLSelMedium->SetTextColor(color);
140  fBSelMedium = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_MEDIA_SELECT);
141  fBSelMedium->SetToolTipText("Replace with one of the existing media");
142  fBSelMedium->Associate(this);
143  f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
144  fEditMedium = new TGTextButton(f1, "Edit");
145  f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
146  fEditMedium->SetToolTipText("Edit selected medium");
147  fEditMedium->Associate(this);
148  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
149 
150  // List of daughters
151  si = new TGShutterItem(fCategories, new TGHotString("Daughters"),kCAT_DAUGHTERS);
152  container = (TGCompositeFrame*)si->GetContainer();
154  fCategories->AddItem(si);
155 
156  // Existing daughters
157  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
158  f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
159  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
160  gClient->GetColorByName("#ff0000", color);
161  label->SetTextColor(color);
162  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
163 
164  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
167  fNodeList->Associate(this);
168  f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
169  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
170  // Buttons for editing matrix and removing node
171  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
172  fEditMatrix = new TGTextButton(f1, "Position");
173  f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
174  fEditMatrix->SetToolTipText("Edit the position of selected node");
175  fEditMatrix->Associate(this);
176  fRemoveNode = new TGTextButton(f1, "Remove");
177  f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
178  fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
179  fRemoveNode->Associate(this);
180  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
181 
182  // Adding daughters
183  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
184  f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
185  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
186  gClient->GetColorByName("#ff0000", color);
187  label->SetTextColor(color);
188  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
189 
190  // Select from existing volumes
191  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
192  fSelectedVolume = 0;
193  fLSelVolume = new TGLabel(f1, "Select volume");
194  gClient->GetColorByName("#0000ff", color);
195  fLSelVolume->SetTextColor(color);
198  fBSelVolume = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_VOL_SELECT);
199  fBSelVolume->SetToolTipText("Select one of the existing volumes");
200  fBSelVolume->Associate(this);
201  f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
202  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
203 
204  // Matrix selection for nodes
205  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
206  fSelectedMatrix = 0;
207  fLSelMatrix = new TGLabel(f1, "Select matrix");
208  gClient->GetColorByName("#0000ff", color);
209  fLSelMatrix->SetTextColor(color);
212  fBSelMatrix = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_MATRIX_SELECT);
213  fBSelMatrix->SetToolTipText("Select one of the existing matrices");
214  fBSelMatrix->Associate(this);
215  f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
216  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
217 
218  // Copy number
219  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
220  f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
221  fCopyNumber = new TGNumberEntry(f1, 0., 5, kVOL_NODEID);
226  nef->SetToolTipText("Enter node copy number");
227  fCopyNumber->Associate(this);
228  f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
229  fAddNode = new TGTextButton(f1, "Add");
230  f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
231  fAddNode->Associate(this);
232  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
233 
234  // Visualization
235  si = new TGShutterItem(fCategories, new TGHotString("Visualization"),kCAT_VIS);
236  container = (TGCompositeFrame*)si->GetContainer();
238  fCategories->AddItem(si);
239 
240  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
241  f1->AddFrame(label = new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
242  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
243 // gClient->GetColorByName("#ff0000", color);
244 // label->SetTextColor(color);
245  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
246 
247  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth | kSunkenFrame | kDoubleBorder);
248  fBVis[0] = new TGCheckButton(f1, "Volume");
249  fBVis[1] = new TGCheckButton(f1, "Nodes");
250  f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
251  f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
252  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
253 
254  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
255  f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
256 // gClient->GetColorByName("#0000ff", color);
257 // label->SetTextColor(color);
258  fEVisLevel = new TGNumberEntry(f1, 0, 5, kVOL_VISLEVEL);
263  nef->SetToolTipText("Set visibility level here");
264  fEVisLevel->SetNumber(3);
265  fEVisLevel->Associate(this);
266  f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
267  fBAuto = new TGCheckButton(f1,"Auto");
268  f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
269  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
270 
271  TString stitle = "View";
272  TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
273  fBView[0] = new TGRadioButton(bg, "All");
274  fBView[1] = new TGRadioButton(bg, "Leaves");
275  fBView[2] = new TGRadioButton(bg, "Only");
277  bg->Show();
278  container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
279 
280  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth | kSunkenFrame | kDoubleBorder);
281  fBRaytrace = new TGCheckButton(f1,"Raytrace");
282  f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
283  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
284 
285  // Division
286  si = new TGShutterItem(fCategories, new TGHotString("Division"),kCAT_DIVISION);
287  container = (TGCompositeFrame*)si->GetContainer();
289  fCategories->AddItem(si);
290  // TextEntry for division name
291  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
292  f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
293  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
294  gClient->GetColorByName("#ff0000", color);
295  label->SetTextColor(color);
296  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
297  fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
299  fDivName->SetToolTipText("Enter the volume name");
300  container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
301  // Axis selection
302  stitle = "Axis";
303  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
304  bg = new TGVButtonGroup(f1, stitle);
305  fBDiv[0] = new TGRadioButton(bg, "Axis 1");
306  fBDiv[1] = new TGRadioButton(bg, "Axis 2");
307  fBDiv[2] = new TGRadioButton(bg, "Axis 3");
308  bg->Insert(fBDiv[0]);
309  bg->Insert(fBDiv[1]);
310  bg->Insert(fBDiv[2]);
312  f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
313  fApplyDiv = new TGTextButton(f1, "Apply");
314  fApplyDiv->SetToolTipText("Apply new division settings");
315  f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
316  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
317  // Division range
318  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
319  f1->AddFrame(label = new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
320  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
321 // gClient->GetColorByName("#ff0000", color);
322 // label->SetTextColor(color);
323  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
324  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
325  f1->AddFrame(label = new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
326 // gClient->GetColorByName("#0000ff", color);
327 // label->SetTextColor(color);
328  fEDivFrom = new TGNumberEntry(f1, 0, 5, kVOL_DIVSTART);
329 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
330 // fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
333  nef->SetToolTipText("Set start value");
334  fEDivFrom->Associate(this);
335  f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
336  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
337 
338  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
339  f1->AddFrame(label = new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
340 // gClient->GetColorByName("#0000ff", color);
341 // label->SetTextColor(color);
342  fEDivStep = new TGNumberEntry(f1, 0, 5, kVOL_DIVSTEP);
343 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
347  nef->SetToolTipText("Set division step");
348  fEDivStep->Associate(this);
349  f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
350  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
351 
352  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame |kFixedWidth);
353  f1->AddFrame(label = new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
354 // gClient->GetColorByName("#0000ff", color);
355 // label->SetTextColor(color);
356  fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
360  nef = (TGTextEntry*)fEDivN->GetNumberEntry();
361  nef->SetToolTipText("Set number of slices");
362  fEDivN->Associate(this);
363  f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
364  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
365 
366 
367  fCategories->Resize(163,340);
369 
370  fCategories->Layout();
372 }
373 
374 ////////////////////////////////////////////////////////////////////////////////
375 /// Destructor
376 
378 {
379  TGCompositeFrame *cont;
380  cont = (TGCompositeFrame*)fCategories->GetItem("Properties")->GetContainer();
382  fCategories->GetItem("Properties")->SetCleanup(0);
383  cont = (TGCompositeFrame*)fCategories->GetItem("Daughters")->GetContainer();
385  fCategories->GetItem("Daughters")->SetCleanup(0);
386  cont = (TGCompositeFrame*)fCategories->GetItem("Visualization")->GetContainer();
388  fCategories->GetItem("Visualization")->SetCleanup(0);
389  cont = (TGCompositeFrame*)fCategories->GetItem("Division")->GetContainer();
391  fCategories->GetItem("Division")->SetCleanup(0);
392 
393  delete fBView[0]; delete fBView[1]; delete fBView[2];
394  delete fBDiv [0]; delete fBDiv [1]; delete fBDiv [2];
395  Cleanup();
396 }
397 
398 ////////////////////////////////////////////////////////////////////////////////
399 /// Connect signals to slots.
400 
402 {
403  fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
404  fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
405  fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
406  fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
407  fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
408  fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
409  fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
410  fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
411  fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
412  fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
413  fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
414  fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
415  fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
416  fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
417  fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
418  fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
419  fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
420  fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
421  fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
422  fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
423  fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
424  fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
425  fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
426  fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
427  fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
428  fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
429 }
430 
431 ////////////////////////////////////////////////////////////////////////////////
432 /// Connect to the picked volume.
433 
435 {
436  if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
437  SetActive(kFALSE);
438  return;
439  }
440  fVolume = (TGeoVolume*)obj;
442  const char *vname = fVolume->GetName();
443  fVolumeName->SetText(vname);
448 
450  TIter next2(fVolume->GetNodes());
451  TGeoNode *node;
452  Int_t icrt = 0;
453  while ((node=(TGeoNode*)next2()))
454  fNodeList->AddEntry(node->GetName(), icrt++);
455  fNodeList->Select(0);
457  if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
460  } else {
463  }
465  if (fVolume->IsAssembly()) {
468  }
472  fBView[1]->SetState((fVolume->IsVisLeaves())?kButtonDown:kButtonUp, kTRUE);
473  fBView[2]->SetState((fVolume->IsVisOnly())?kButtonDown:kButtonUp, kTRUE);
478  if ((!fVolume->GetFinder() && fVolume->GetNdaughters()) || fVolume->IsAssembly()) {
479  fCategories->GetItem("Division")->GetButton()->SetEnabled(kFALSE);
480  } else {
481  fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
482  Double_t start=0., step=0., end = 0.;
483  Int_t ndiv = 2, iaxis = 1;
484  TString axis_name;
485  for (Int_t i=0; i<3; i++) {
486  axis_name = fVolume->GetShape()->GetAxisName(i+1);
487  fBDiv[i]->SetText(axis_name);
488  }
489 
490  if (fVolume->GetFinder()) {
492  iaxis = fVolume->GetFinder()->GetDivAxis();
493  start = fVolume->GetFinder()->GetStart();
494  step = fVolume->GetFinder()->GetStep();
495  ndiv = fVolume->GetFinder()->GetNdiv();
496  } else {
497  fDivName->SetText("Enter name");
498  fSelectedShape->GetAxisRange(iaxis,start,end);
499  step = 0;
500  }
501  fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
502  fEDivFrom->SetNumber(start);
503  fEDivStep->SetNumber(step);
504  fEDivN->SetNumber(ndiv);
505  }
506 
508  SetActive();
509  if (GetParent()==fTabMgr->GetVolumeTab()) fTab->Layout();
510 }
511 
512 ////////////////////////////////////////////////////////////////////////////////
513 /// Add editors to fGedFrame and exclude TLineEditor.
514 
516 {
519 }
520 
521 ////////////////////////////////////////////////////////////////////////////////
522 /// Modify volume name.
523 
525 {
527 }
528 
529 ////////////////////////////////////////////////////////////////////////////////
530 /// Select a new shape.
531 
533 {
534  TGeoShape *shape = fSelectedShape;
535  new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
537  if (fSelectedShape) fLSelShape->SetText(fSelectedShape->GetName());
538  else fSelectedShape = shape;
539 }
540 
541 ////////////////////////////////////////////////////////////////////////////////
542 /// Select a new medium.
543 
545 {
547  new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
549  if (fSelectedMedium) fLSelMedium->SetText(fSelectedMedium->GetName());
550  else fSelectedMedium = med;
551 }
552 
553 ////////////////////////////////////////////////////////////////////////////////
554 /// Select a matrix for positioning.
555 
557 {
558  TGeoMatrix *matrix = fSelectedMatrix;
559  new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
561  if (fSelectedMatrix) fLSelMatrix->SetText(fSelectedMatrix->GetName());
562  else fSelectedMatrix = matrix;
563 }
564 
565 ////////////////////////////////////////////////////////////////////////////////
566 /// Select a daughter volume.
567 
569 {
571  new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
573  if (fSelectedVolume) fLSelVolume->SetText(fSelectedVolume->GetName());
574  else fSelectedVolume = vol;
575  if (fSelectedVolume)
577 }
578 
579 
580 ////////////////////////////////////////////////////////////////////////////////
581 /// Edit the shape of the volume.
582 
584 {
586 }
587 
588 ////////////////////////////////////////////////////////////////////////////////
589 /// Edit the medium of the volume.
590 
592 {
594 }
595 
596 ////////////////////////////////////////////////////////////////////////////////
597 /// Edit the position of the selected node.
598 
600 {
601  if (!fVolume->GetNdaughters()) return;
602  Int_t i = fNodeList->GetSelected();
603  if (i<0) return;
605 }
606 
607 ////////////////////////////////////////////////////////////////////////////////
608 /// Add a daughter.
609 
611 {
612  if (!fSelectedVolume || fVolume->GetFinder()) return;
613  Int_t icopy = fCopyNumber->GetIntNumber();
615  Int_t nd = fVolume->GetNdaughters();
616  fNodeList->AddEntry(fVolume->GetNode(nd-1)->GetName(), nd-1);
617  fNodeList->Select(nd-1);
618  fCopyNumber->SetNumber(nd+1);
624  Update();
625 }
626 
627 ////////////////////////////////////////////////////////////////////////////////
628 /// Remove a daughter.
629 
631 {
632  if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
635  return;
636  }
637  Int_t i = fNodeList->GetSelected();
638  if (i<0) return;
641  TIter next(fVolume->GetNodes());
642  TGeoNode *node;
643  i = 0;
644  while ((node=(TGeoNode*)next()))
645  fNodeList->AddEntry(node->GetName(), i++);
646  fNodeList->Select(0);
648  if (!fVolume->GetNdaughters()) {
651  fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
652  Double_t start=0., step=0., end=0.;
653  Int_t ndiv = 2, iaxis = 1;
654  fSelectedShape->GetAxisRange(iaxis,start,end);
655  step = end-start;
656  fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
657  fEDivFrom->SetNumber(start);
658  fEDivStep->SetNumber(step);
659  fEDivN->SetNumber(ndiv);
660  }
661  Update();
662 }
663 
664 ////////////////////////////////////////////////////////////////////////////////
665 /// Slot for setting volume visible/invisible.
666 
668 {
670  if (fVolume->IsVisible() == on) return;
671  fVolume->SetVisibility(on);
672  Update();
673 }
674 
675 ////////////////////////////////////////////////////////////////////////////////
676 /// Slot for setting daughters visible/invisible.
677 
679 {
681  if (fVolume->IsVisibleDaughters() == on) return;
683  Update();
684 }
685 
686 ////////////////////////////////////////////////////////////////////////////////
687 /// Slot for setting visibility depth auto.
688 
690 {
692  if ((fGeometry->GetVisLevel()==0) == on) return;
693  if (on) fGeometry->SetVisLevel(0);
695  Update();
696 }
697 
698 ////////////////////////////////////////////////////////////////////////////////
699 /// Slot for visibility level.
700 
702 {
705  Update();
706 }
707 
708 ////////////////////////////////////////////////////////////////////////////////
709 /// Slot for viewing volume and containers.
710 
712 {
714  if (!on) return;
715  if (fVolume->IsVisContainers() == on) return;
716  if (fVolume->IsRaytracing()) {
719  }
721  Update();
722 }
723 
724 ////////////////////////////////////////////////////////////////////////////////
725 /// Slot for viewing last leaves only.
726 
728 {
730  if (!on) return;
731  if (fVolume->IsVisLeaves() == on) return;
732  if (fVolume->IsRaytracing()) {
735  }
736  fVolume->SetVisLeaves(on);
737  Update();
738 }
739 
740 ////////////////////////////////////////////////////////////////////////////////
741 /// Slot for viewing volume only.
742 
744 {
746  if (!on) return;
747  if (fVolume->IsVisOnly() == on) return;
748  if (fVolume->IsRaytracing()) {
751  }
752  fVolume->SetVisOnly(on);
753  Update();
754 }
755 
756 ////////////////////////////////////////////////////////////////////////////////
757 /// Slot for raytracing.
758 
760 {
762  if (fVolume->IsRaytracing() == on) return;
763  fVolume->Raytrace(on);
764  Update();
765 }
766 
767 ////////////////////////////////////////////////////////////////////////////////
768 /// Modify division name.
769 
771 {
773 }
774 
775 ////////////////////////////////////////////////////////////////////////////////
776 /// Change division axis and preserve number of slices.
777 
779 {
780  Int_t iaxis = 1;
781  for (Int_t i=0; i<3; i++) {
782  if (fBDiv[i]->GetState()!=kButtonDown) continue;
783  iaxis = i+1;
784  break;
785  }
786  TGeoShape *shape = fVolume->GetShape();
787  if (!shape) {
789  return;
790  }
791  Double_t xlo, xhi;
792  shape->GetAxisRange(iaxis, xlo, xhi);
793  if (xhi <= xlo) {
795  return;
796  }
797  fEDivFrom->SetNumber(xlo);
798  fEDivStep->SetNumber(0);
800 }
801 
802 ////////////////////////////////////////////////////////////////////////////////
803 /// Handle division range modification.
804 
806 {
807  Double_t min, max, xlo, xhi, step;
808  Int_t iaxis = 1;
809  Int_t ndiv;
810  for (Int_t i=0; i<3; i++) {
811  if (fBDiv[i]->GetState()!=kButtonDown) continue;
812  iaxis = i+1;
813  break;
814  }
815  TGeoShape *shape = fVolume->GetShape();
816  if (!shape) {
818  return;
819  }
820  shape->GetAxisRange(iaxis, xlo, xhi);
821  if (xhi-xlo <= 0) {
823  return;
824  }
825  min = fEDivFrom->GetNumber();
826  step = fEDivStep->GetNumber();
827  ndiv = fEDivN->GetIntNumber();
828  if (min<xlo) {
829  min = xlo;
830  fEDivFrom->SetNumber(xlo);
831  }
832  max = min + ndiv*step;
833  if (max>xhi) {
834  max = xhi;
835  step = (max-min)/ndiv;
836  fEDivStep->SetNumber(step);
837  }
838  if (min>=max) {
840  return;
841  }
843 }
844 
845 ////////////////////////////////////////////////////////////////////////////////
846 /// Handle division step modification.
847 
849 {
850  Double_t min, max, xlo, xhi;
851  Int_t iaxis = 1;
852  for (Int_t i=0; i<3; i++) {
853  if (fBDiv[i]->GetState()!=kButtonDown) continue;
854  iaxis = i+1;
855  break;
856  }
857  TGeoShape *shape = fVolume->GetShape();
858  if (!shape) {
860  return;
861  }
862  shape->GetAxisRange(iaxis, xlo, xhi);
863  if (xhi-xlo <= 0) {
865  return;
866  }
867  min = fEDivFrom->GetNumber();
868  Double_t step = fEDivStep->GetNumber();
869  Int_t ndiv = fEDivN->GetIntNumber();
870  max = min + ndiv*step;
871 
872  // Check if ndiv*step < max-min
873  if (max <= xhi) {
875  return;
876  }
877  // Step too big - set value to fit range
878  max = xhi;
879  step = (max-min)/ndiv;
880  fEDivStep->SetNumber(step);
881  if (step < 0) {
883  return;
884  }
886 }
887 
888 ////////////////////////////////////////////////////////////////////////////////
889 /// Handle division N modification.
890 
892 {
893  Double_t min, max, xlo, xhi;
894  Int_t iaxis = 1;
895  for (Int_t i=0; i<3; i++) {
896  if (fBDiv[i]->GetState()!=kButtonDown) continue;
897  iaxis = i+1;
898  break;
899  }
900  TGeoShape *shape = fVolume->GetShape();
901  if (!shape) {
903  return;
904  }
905  shape->GetAxisRange(iaxis, xlo, xhi);
906  if (xhi-xlo <= 0) {
908  return;
909  }
910  Double_t step = fEDivStep->GetNumber();
911  // If step=0 it is discounted
912  if (step==0) {
914  return;
915  }
916  Int_t ndiv = fEDivN->GetIntNumber();
917  min = fEDivFrom->GetNumber();
918  max = min + ndiv*step;
919  // Check if ndiv*step < max-min
920  if (max <= xhi) {
922  return;
923  }
924  max = xhi;
925  ndiv = (Int_t)((max-min)/step);
926  fEDivN->SetNumber(ndiv);
928 }
929 
930 ////////////////////////////////////////////////////////////////////////////////
931 /// Apply current division settings
932 
934 {
935  Double_t xlo, xhi, step;
936  Int_t iaxis = 1;
937  Int_t ndiv;
938  for (Int_t i=0; i<3; i++) {
939  if (fBDiv[i]->GetState()!=kButtonDown) continue;
940  iaxis = i+1;
941  break;
942  }
943  TGeoShape *shape = fVolume->GetShape();
944  if (!shape) {
946  return;
947  }
948  shape->GetAxisRange(iaxis, xlo, xhi);
949  if (xhi-xlo <= 0) {
951  return;
952  }
953  xlo = fEDivFrom->GetNumber();
954  step = fEDivStep->GetNumber();
955  ndiv = fEDivN->GetIntNumber();
956  TGeoPatternFinder *finder = fVolume->GetFinder();
957  if (finder) {
958  // we have to remove first the existing division
959  TObjArray *nodes = fVolume->GetNodes();
960  nodes->Delete();
961  nodes->Clear();
962  delete finder;
963  fVolume->SetFinder(0);
964  }
965  fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
968  Update();
969 // fVolume->Draw();
970 }
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TGeoVolume * fSelectedVolume
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
Definition: TGShutter.cxx:330
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
void DoDivN()
Handle division N modification.
TGeoMedium * fSelectedMedium
void DoRemoveNode()
Remove a daughter.
An array of TObjects.
Definition: TObjArray.h:37
virtual ~TGeoVolumeEditor()
Destructor.
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
void DoRaytrace()
Slot for raytracing.
virtual void ConnectSignals2Slots()
Connect signals to slots.
void SetFinder(TGeoPatternFinder *finder)
Definition: TGeoVolume.h:234
void DoDivSelAxis()
Change division axis and preserve number of slices.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
Definition: TObjArray.cxx:320
Geometrical transformation package.
Definition: TGeoMatrix.h:40
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:355
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Definition: TGLabel.cxx:359
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
void DoSelectMatrix()
Select a matrix for positioning.
TGTextButton * fApplyDiv
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
void DoSelectShape()
Select a new shape.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:48
void DoVisAuto()
Slot for setting visibility depth auto.
virtual void SetNumber(Double_t val)
TGeoMatrix * fSelectedMatrix
TGNumberEntry * fEVisLevel
void DoAddNode()
Add a daughter.
TGTextEntry * fDivName
Basic string class.
Definition: TString.h:125
#define gClient
Definition: TGClient.h:166
int Int_t
Definition: RtypesCore.h:41
void VisibleDaughters(Bool_t vis=kTRUE)
set visibility for daughters
bool Bool_t
Definition: RtypesCore.h:59
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
Int_t GetNdiv() const
void DoVolumeName()
Modify volume name.
void RemoveNode(TGeoNode *node)
Remove an existing daughter.
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
Definition: TGedEditor.cxx:578
void DoEditMedium()
Edit the medium of the volume.
void DoViewLeaves()
Slot for viewing last leaves only.
TGeoVolume * fVolume
Bool_t IsVisibleDaughters() const
Definition: TGeoVolume.h:157
Bool_t IsVisContainers() const
Definition: TGeoVolume.h:158
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
void DoDivName()
Modify division name.
void Raytrace(Bool_t flag=kTRUE)
Draw this volume with current settings and perform raytracing in the pad.
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set radio button state.
Definition: TGButton.cxx:1563
Bool_t IsRaytracing() const
Check if the painter is currently ray-tracing the content of this volume.
Definition: TGeoVolume.cxx:873
TObjArray * GetNodes()
Definition: TGeoVolume.h:170
TGTextButton * fEditMedium
Int_t GetNdaughters() const
Definition: TGeoVolume.h:350
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition: TGShutter.cxx:71
TGNumberEntry * fEDivStep
TGeoPatternFinder * GetFinder() const
Definition: TGeoVolume.h:178
virtual void SetModel(TObject *obj)
Connect to the picked volume.
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
TGComboBox * fNodeList
TGFrame * GetContainer() const
Definition: TGShutter.h:59
ULong_t Pixel_t
Definition: GuiTypes.h:39
virtual Long_t GetIntNumber() const
void Class()
Definition: Class.C:29
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGTextButton * fEditMatrix
Bool_t IsVisOnly() const
Definition: TGeoVolume.h:160
virtual void SetText(TGString *newText)
Set new text in label.
Definition: TGLabel.cxx:177
TGTextEntry * fVolumeName
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
void DoVisDaughters()
Slot for setting daughters visible/invisible.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Definition: TGComboBox.cxx:443
TGCompositeFrame(const TGCompositeFrame &)
TGeoMedium * GetMedium() const
Definition: TGeoVolume.h:176
void DoApplyDiv()
Apply current division settings.
virtual void SetRadioButtonExclusive(Bool_t flag=kTRUE)
If enable is kTRUE, this button group will treat radio buttons as mutually exclusive, and other buttons according to IsExclusive().
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:156
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
Definition: TGShutter.cxx:300
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:294
virtual TGeoMatrix * GetMatrix() const =0
TGeoVolumeEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoVisLevel()
Slot for visibility level.
void DoVisVolume()
Slot for setting volume visible/invisible.
TGTextButton * fAddNode
virtual EButtonState GetState() const
Definition: TGButton.h:112
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Division a la G3.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
Definition: TGeoVolume.cxx:984
TGCompositeFrame * GetVolumeTab() const
Base finder class for patterns.
Double_t GetStep() const
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:248
TGShutter * fCategories
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
Definition: TQObject.cxx:867
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
TGCheckButton * fBVis[2]
TGPictureButton * fBSelShape
Base abstract class for all shapes.
Definition: TGeoShape.h:25
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:371
void SetNumStyle(EStyle style)
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
Double_t GetStart() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
void DoViewOnly()
Slot for viewing volume only.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:221
TGCheckButton * fBAuto
unsigned int UInt_t
Definition: RtypesCore.h:42
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
void DoEditMatrix()
Edit the position of the selected node.
static TObject * GetSelected()
static; return selected object
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual const char * GetAxisName(Int_t iaxis) const =0
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition: TGButton.cxx:594
virtual void Layout()
Layout shutter items.
Definition: TGShutter.cxx:216
const char * GetText() const
Definition: TGTextEntry.h:134
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
TGPictureButton * fBSelMatrix
#define ClassImp(name)
Definition: Rtypes.h:359
double Double_t
Definition: RtypesCore.h:55
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1054
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:409
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
virtual Double_t GetNumber() const
TGTextButton * fRemoveNode
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:287
virtual void ActivateBaseClassEditors(TClass *cl)
Add editors to fGedFrame and exclude TLineEditor.
TGRadioButton * fBDiv[3]
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
virtual Int_t Insert(TGButton *button, int id=-1)
Inserts a button with the identifier id into the button group.
ETGeoVolumeWid
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void Show()
Show group of buttons.
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:23
const TGWindow * GetParent() const
Definition: TGWindow.h:85
void DoSelectMedium()
Select a new medium.
Bool_t IsVisLeaves() const
Definition: TGeoVolume.h:159
virtual Int_t GetNumberOfEntries() const
Definition: TGComboBox.h:127
virtual Int_t GetDivAxis()
TGCheckButton * fBRaytrace
TGNumberEntry * fCopyNumber
Mother of all ROOT objects.
Definition: TObject.h:37
TGRadioButton * fBView[3]
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:39
Bool_t fInit
Definition: TGedFrame.h:53
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
virtual Int_t GetSelected() const
Definition: TGComboBox.h:134
TGNumberEntryField * GetNumberEntry() const
Editor for geometry volumes and assemblies of volumes.
TGClient * fClient
Definition: TGObject.h:37
TF1 * f1
Definition: legend1.C:11
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
TGTextButton * fEditShape
TGButton * GetButton() const
Definition: TGShutter.h:58
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:174
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
void DoDivFromTo()
Handle division range modification.
void DoEditShape()
Edit the shape of the volume.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
TGeoShape * GetShape() const
Definition: TGeoVolume.h:191
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition: TGComboBox.h:125
void DoDivStep()
Handle division step modification.
TGPictureButton * fBSelVolume
void DoViewAll()
Slot for viewing volume and containers.
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
const Bool_t kTRUE
Definition: RtypesCore.h:87
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
TGNumberEntry * fEDivN
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:395
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:303
TGPictureButton * fBSelMedium
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:94
TGNumberEntry * fEDivFrom
void DoSelectVolume()
Select a daughter volume.
TGeoManager * fGeometry
TGTab * fTab
Definition: TGeoGedFrame.h:16
TGeoTabManager * fTabMgr
Definition: TGeoGedFrame.h:17
UInt_t GetDefaultHeight() const
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
TGeoShape * fSelectedShape
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:168
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.