Logo ROOT   6.10/09
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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TGeoVolumeEditor //
15 //
16 //////////////////////////////////////////////////////////////////////////
17 /* Editor for geometry volumes and assemblies of volumes. Besides the volume
18  name and line attributes, a TGeoVolume has the following editable categories
19  split vertically by a shutter:
20  - Properties: one can edit the shape and medium components from here. It is
21  also possible to change the existing ones.
22  - Daughters: the main category allowing defining, editing, removing or
23  positioning daughter volumes inside the current edited volume. To add a
24  daughter, one needs to select first a volume and a matrix. Currently no check
25  is performed if the daughter volume creates an extrusion (illegal for tracking).
26  To remove or change the position of an existing daughter, one should simply
27  select the desired daughter from the combo box with the existing ones, then
28  simply click the appropriate button.
29  - Visualization: One can set the visibility of the volume and of its daughters,
30  set the visibility depth and the view type. Selecting "All" will draw the
31  volume and all visible daughters down to the selected level starting from the
32  edited volume. Selecting "Leaves" will draw just the deepest daughters within
33  the selected visibility level, without displaying the containers, while "Only"
34  will just draw the edited volume.
35  - Division: The category becomes active only if there are no daughters of the
36  edited volume added by normal positioning (e.g. from <Daughters> category). The
37  minimum allowed starting value for the selected division axis is automatically
38  selected, while the dslicing step is set to 0 - meaning that only the number
39  of slices matter.
40 */
41 
42 #include "TGeoVolumeEditor.h"
43 #include "TGeoVolume.h"
44 #include "TGeoPatternFinder.h"
45 #include "TGeoManager.h"
46 #include "TGeoMatrix.h"
47 #include "TVirtualPad.h"
48 #include "TBaseClass.h"
49 #include "TGTab.h"
50 #include "TGComboBox.h"
51 #include "TGButton.h"
52 #include "TGButtonGroup.h"
53 #include "TGTextEntry.h"
54 #include "TGNumberEntry.h"
55 #include "TGLabel.h"
56 #include "TGShutter.h"
57 #include "TG3DLine.h"
58 #include "TGeoTabManager.h"
59 #include "TGedEditor.h"
60 
62 
69 };
70 
71 ////////////////////////////////////////////////////////////////////////////////
72 /// Constructor for volume editor.
73 
75  Int_t height, UInt_t options, Pixel_t back)
76  : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
77 {
78  fGeometry = 0;
79  fVolume = 0;
80 
84 
85  // TGShutter for categories
86  fCategories = new TGShutter(this, kSunkenFrame);
87  TGCompositeFrame *container, *f1;
88  Pixel_t color;
89  TGLabel *label;
90 
91  // General settings
92  TGShutterItem *si = new TGShutterItem(fCategories, new TGHotString("Properties"),kCAT_GENERAL);
93  container = (TGCompositeFrame*)si->GetContainer();
95  fCategories->AddItem(si);
96 
97  // TextEntry for volume name
98  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
99  f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
100  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
101  gClient->GetColorByName("#ff0000", color);
102  label->SetTextColor(color);
103  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
104  fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
106  fVolumeName->SetToolTipText("Enter the volume name");
107  container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
108 
109  // Current shape
110  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
111  f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
112  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
113  gClient->GetColorByName("#ff0000", color);
114  label->SetTextColor(color);
115  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
116  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
117  fSelectedShape = 0;
118  fLSelShape = new TGLabel(f1, "Select shape");
119  gClient->GetColorByName("#0000ff", color);
120  fLSelShape->SetTextColor(color);
123  fBSelShape = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_SHAPE_SELECT);
124  fBSelShape->SetToolTipText("Replace with one of the existing shapes");
125  fBSelShape->Associate(this);
126  f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
127  fEditShape = new TGTextButton(f1, "Edit");
128  f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
129  fEditShape->SetToolTipText("Edit selected shape");
130  fEditShape->Associate(this);
131  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
132 
133  // Current medium
134  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
135  fSelectedMedium = 0;
136  fLSelMedium = new TGLabel(f1, "Select medium");
137  gClient->GetColorByName("#0000ff", color);
138  fLSelMedium->SetTextColor(color);
141  fBSelMedium = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_MEDIA_SELECT);
142  fBSelMedium->SetToolTipText("Replace with one of the existing media");
143  fBSelMedium->Associate(this);
144  f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
145  fEditMedium = new TGTextButton(f1, "Edit");
146  f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
147  fEditMedium->SetToolTipText("Edit selected medium");
148  fEditMedium->Associate(this);
149  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
150 
151  // List of daughters
152  si = new TGShutterItem(fCategories, new TGHotString("Daughters"),kCAT_DAUGHTERS);
153  container = (TGCompositeFrame*)si->GetContainer();
155  fCategories->AddItem(si);
156 
157  // Existing daughters
158  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
159  f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
160  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
161  gClient->GetColorByName("#ff0000", color);
162  label->SetTextColor(color);
163  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
164 
165  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
168  fNodeList->Associate(this);
169  f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
170  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
171  // Buttons for editing matrix and removing node
172  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
173  fEditMatrix = new TGTextButton(f1, "Position");
174  f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
175  fEditMatrix->SetToolTipText("Edit the position of selected node");
176  fEditMatrix->Associate(this);
177  fRemoveNode = new TGTextButton(f1, "Remove");
178  f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
179  fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
180  fRemoveNode->Associate(this);
181  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
182 
183  // Adding daughters
184  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
185  f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
186  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
187  gClient->GetColorByName("#ff0000", color);
188  label->SetTextColor(color);
189  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
190 
191  // Select from existing volumes
192  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
193  fSelectedVolume = 0;
194  fLSelVolume = new TGLabel(f1, "Select volume");
195  gClient->GetColorByName("#0000ff", color);
196  fLSelVolume->SetTextColor(color);
199  fBSelVolume = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_VOL_SELECT);
200  fBSelVolume->SetToolTipText("Select one of the existing volumes");
201  fBSelVolume->Associate(this);
202  f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
203  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
204 
205  // Matrix selection for nodes
206  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
207  fSelectedMatrix = 0;
208  fLSelMatrix = new TGLabel(f1, "Select matrix");
209  gClient->GetColorByName("#0000ff", color);
210  fLSelMatrix->SetTextColor(color);
213  fBSelMatrix = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kVOL_MATRIX_SELECT);
214  fBSelMatrix->SetToolTipText("Select one of the existing matrices");
215  fBSelMatrix->Associate(this);
216  f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
217  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
218 
219  // Copy number
220  f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
221  f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
222  fCopyNumber = new TGNumberEntry(f1, 0., 5, kVOL_NODEID);
227  nef->SetToolTipText("Enter node copy number");
228  fCopyNumber->Associate(this);
229  f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
230  fAddNode = new TGTextButton(f1, "Add");
231  f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
232  fAddNode->Associate(this);
233  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
234 
235  // Visualization
236  si = new TGShutterItem(fCategories, new TGHotString("Visualization"),kCAT_VIS);
237  container = (TGCompositeFrame*)si->GetContainer();
239  fCategories->AddItem(si);
240 
241  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
242  f1->AddFrame(label = new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
243  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
244 // gClient->GetColorByName("#ff0000", color);
245 // label->SetTextColor(color);
246  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
247 
248  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth | kSunkenFrame | kDoubleBorder);
249  fBVis[0] = new TGCheckButton(f1, "Volume");
250  fBVis[1] = new TGCheckButton(f1, "Nodes");
251  f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
252  f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
253  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
254 
255  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
256  f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
257 // gClient->GetColorByName("#0000ff", color);
258 // label->SetTextColor(color);
259  fEVisLevel = new TGNumberEntry(f1, 0, 5, kVOL_VISLEVEL);
264  nef->SetToolTipText("Set visibility level here");
265  fEVisLevel->SetNumber(3);
266  fEVisLevel->Associate(this);
267  f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
268  fBAuto = new TGCheckButton(f1,"Auto");
269  f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
270  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
271 
272  TString stitle = "View";
273  TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
274  fBView[0] = new TGRadioButton(bg, "All");
275  fBView[1] = new TGRadioButton(bg, "Leaves");
276  fBView[2] = new TGRadioButton(bg, "Only");
278  bg->Show();
279  container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
280 
281  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth | kSunkenFrame | kDoubleBorder);
282  fBRaytrace = new TGCheckButton(f1,"Raytrace");
283  f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
284  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
285 
286  // Division
287  si = new TGShutterItem(fCategories, new TGHotString("Division"),kCAT_DIVISION);
288  container = (TGCompositeFrame*)si->GetContainer();
290  fCategories->AddItem(si);
291  // TextEntry for division name
292  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
293  f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
294  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
295  gClient->GetColorByName("#ff0000", color);
296  label->SetTextColor(color);
297  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
298  fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
300  fDivName->SetToolTipText("Enter the volume name");
301  container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
302  // Axis selection
303  stitle = "Axis";
304  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
305  bg = new TGVButtonGroup(f1, stitle);
306  fBDiv[0] = new TGRadioButton(bg, "Axis 1");
307  fBDiv[1] = new TGRadioButton(bg, "Axis 2");
308  fBDiv[2] = new TGRadioButton(bg, "Axis 3");
309  bg->Insert(fBDiv[0]);
310  bg->Insert(fBDiv[1]);
311  bg->Insert(fBDiv[2]);
313  f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
314  fApplyDiv = new TGTextButton(f1, "Apply");
315  fApplyDiv->SetToolTipText("Apply new division settings");
316  f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
317  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
318  // Division range
319  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
320  f1->AddFrame(label = new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
321  f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
322 // gClient->GetColorByName("#ff0000", color);
323 // label->SetTextColor(color);
324  container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
325  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
326  f1->AddFrame(label = new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
327 // gClient->GetColorByName("#0000ff", color);
328 // label->SetTextColor(color);
329  fEDivFrom = new TGNumberEntry(f1, 0, 5, kVOL_DIVSTART);
330 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
331 // fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
334  nef->SetToolTipText("Set start value");
335  fEDivFrom->Associate(this);
336  f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
337  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
338 
339  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
340  f1->AddFrame(label = new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
341 // gClient->GetColorByName("#0000ff", color);
342 // label->SetTextColor(color);
343  fEDivStep = new TGNumberEntry(f1, 0, 5, kVOL_DIVSTEP);
344 // fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
348  nef->SetToolTipText("Set division step");
349  fEDivStep->Associate(this);
350  f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
351  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
352 
353  f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame |kFixedWidth);
354  f1->AddFrame(label = new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
355 // gClient->GetColorByName("#0000ff", color);
356 // label->SetTextColor(color);
357  fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
361  nef = (TGTextEntry*)fEDivN->GetNumberEntry();
362  nef->SetToolTipText("Set number of slices");
363  fEDivN->Associate(this);
364  f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
365  container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
366 
367 
368  fCategories->Resize(163,340);
370 
371  fCategories->Layout();
373 }
374 
375 ////////////////////////////////////////////////////////////////////////////////
376 /// Destructor
377 
379 {
380  TGCompositeFrame *cont;
381  cont = (TGCompositeFrame*)fCategories->GetItem("Properties")->GetContainer();
383  fCategories->GetItem("Properties")->SetCleanup(0);
384  cont = (TGCompositeFrame*)fCategories->GetItem("Daughters")->GetContainer();
386  fCategories->GetItem("Daughters")->SetCleanup(0);
387  cont = (TGCompositeFrame*)fCategories->GetItem("Visualization")->GetContainer();
389  fCategories->GetItem("Visualization")->SetCleanup(0);
390  cont = (TGCompositeFrame*)fCategories->GetItem("Division")->GetContainer();
392  fCategories->GetItem("Division")->SetCleanup(0);
393 
394  delete fBView[0]; delete fBView[1]; delete fBView[2];
395  delete fBDiv [0]; delete fBDiv [1]; delete fBDiv [2];
396  Cleanup();
397 }
398 
399 ////////////////////////////////////////////////////////////////////////////////
400 /// Connect signals to slots.
401 
403 {
404  fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
405  fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
406  fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
407  fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
408  fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
409  fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
410  fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
411  fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
412  fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
413  fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
414  fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
415  fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
416  fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
417  fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
418  fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
419  fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
420  fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
421  fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
422  fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
423  fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
424  fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
425  fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
426  fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
427  fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
428  fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
429  fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
430 }
431 
432 ////////////////////////////////////////////////////////////////////////////////
433 /// Connect to the picked volume.
434 
436 {
437  if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
438  SetActive(kFALSE);
439  return;
440  }
441  fVolume = (TGeoVolume*)obj;
443  const char *vname = fVolume->GetName();
444  fVolumeName->SetText(vname);
449 
451  TIter next2(fVolume->GetNodes());
452  TGeoNode *node;
453  Int_t icrt = 0;
454  while ((node=(TGeoNode*)next2()))
455  fNodeList->AddEntry(node->GetName(), icrt++);
456  fNodeList->Select(0);
458  if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
461  } else {
464  }
466  if (fVolume->IsAssembly()) {
469  }
473  fBView[1]->SetState((fVolume->IsVisLeaves())?kButtonDown:kButtonUp, kTRUE);
474  fBView[2]->SetState((fVolume->IsVisOnly())?kButtonDown:kButtonUp, kTRUE);
479  if ((!fVolume->GetFinder() && fVolume->GetNdaughters()) || fVolume->IsAssembly()) {
480  fCategories->GetItem("Division")->GetButton()->SetEnabled(kFALSE);
481  } else {
482  fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
483  Double_t start=0., step=0., end = 0.;
484  Int_t ndiv = 2, iaxis = 1;
485  TString axis_name;
486  for (Int_t i=0; i<3; i++) {
487  axis_name = fVolume->GetShape()->GetAxisName(i+1);
488  fBDiv[i]->SetText(axis_name);
489  }
490 
491  if (fVolume->GetFinder()) {
493  iaxis = fVolume->GetFinder()->GetDivAxis();
494  start = fVolume->GetFinder()->GetStart();
495  step = fVolume->GetFinder()->GetStep();
496  ndiv = fVolume->GetFinder()->GetNdiv();
497  } else {
498  fDivName->SetText("Enter name");
499  fSelectedShape->GetAxisRange(iaxis,start,end);
500  step = 0;
501  }
502  fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
503  fEDivFrom->SetNumber(start);
504  fEDivStep->SetNumber(step);
505  fEDivN->SetNumber(ndiv);
506  }
507 
509  SetActive();
510  if (GetParent()==fTabMgr->GetVolumeTab()) fTab->Layout();
511 }
512 
513 ////////////////////////////////////////////////////////////////////////////////
514 /// Add editors to fGedFrame and exclude TLineEditor.
515 
517 {
520 }
521 
522 ////////////////////////////////////////////////////////////////////////////////
523 /// Modify volume name.
524 
526 {
528 }
529 
530 ////////////////////////////////////////////////////////////////////////////////
531 /// Select a new shape.
532 
534 {
535  TGeoShape *shape = fSelectedShape;
536  new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
538  if (fSelectedShape) fLSelShape->SetText(fSelectedShape->GetName());
539  else fSelectedShape = shape;
540 }
541 
542 ////////////////////////////////////////////////////////////////////////////////
543 /// Select a new medium.
544 
546 {
548  new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
550  if (fSelectedMedium) fLSelMedium->SetText(fSelectedMedium->GetName());
551  else fSelectedMedium = med;
552 }
553 
554 ////////////////////////////////////////////////////////////////////////////////
555 /// Select a matrix for positioning.
556 
558 {
559  TGeoMatrix *matrix = fSelectedMatrix;
560  new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
562  if (fSelectedMatrix) fLSelMatrix->SetText(fSelectedMatrix->GetName());
563  else fSelectedMatrix = matrix;
564 }
565 
566 ////////////////////////////////////////////////////////////////////////////////
567 /// Select a daughter volume.
568 
570 {
572  new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
574  if (fSelectedVolume) fLSelVolume->SetText(fSelectedVolume->GetName());
575  else fSelectedVolume = vol;
576  if (fSelectedVolume)
578 }
579 
580 
581 ////////////////////////////////////////////////////////////////////////////////
582 /// Edit the shape of the volume.
583 
585 {
587 }
588 
589 ////////////////////////////////////////////////////////////////////////////////
590 /// Edit the medium of the volume.
591 
593 {
595 }
596 
597 ////////////////////////////////////////////////////////////////////////////////
598 /// Edit the position of the selected node.
599 
601 {
602  if (!fVolume->GetNdaughters()) return;
603  Int_t i = fNodeList->GetSelected();
604  if (i<0) return;
606 }
607 
608 ////////////////////////////////////////////////////////////////////////////////
609 /// Add a daughter.
610 
612 {
613  if (!fSelectedVolume || fVolume->GetFinder()) return;
614  Int_t icopy = fCopyNumber->GetIntNumber();
616  Int_t nd = fVolume->GetNdaughters();
617  fNodeList->AddEntry(fVolume->GetNode(nd-1)->GetName(), nd-1);
618  fNodeList->Select(nd-1);
619  fCopyNumber->SetNumber(nd+1);
625  Update();
626 }
627 
628 ////////////////////////////////////////////////////////////////////////////////
629 /// Remove a daughter.
630 
632 {
633  if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
636  return;
637  }
638  Int_t i = fNodeList->GetSelected();
639  if (i<0) return;
642  TIter next(fVolume->GetNodes());
643  TGeoNode *node;
644  i = 0;
645  while ((node=(TGeoNode*)next()))
646  fNodeList->AddEntry(node->GetName(), i++);
647  fNodeList->Select(0);
649  if (!fVolume->GetNdaughters()) {
652  fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
653  Double_t start=0., step=0., end=0.;
654  Int_t ndiv = 2, iaxis = 1;
655  fSelectedShape->GetAxisRange(iaxis,start,end);
656  step = end-start;
657  fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
658  fEDivFrom->SetNumber(start);
659  fEDivStep->SetNumber(step);
660  fEDivN->SetNumber(ndiv);
661  }
662  Update();
663 }
664 
665 ////////////////////////////////////////////////////////////////////////////////
666 /// Slot for setting volume visible/invisible.
667 
669 {
671  if (fVolume->IsVisible() == on) return;
672  fVolume->SetVisibility(on);
673  Update();
674 }
675 
676 ////////////////////////////////////////////////////////////////////////////////
677 /// Slot for setting daughters visible/invisible.
678 
680 {
682  if (fVolume->IsVisibleDaughters() == on) return;
684  Update();
685 }
686 
687 ////////////////////////////////////////////////////////////////////////////////
688 /// Slot for setting visibility depth auto.
689 
691 {
693  if ((fGeometry->GetVisLevel()==0) == on) return;
694  if (on) fGeometry->SetVisLevel(0);
696  Update();
697 }
698 
699 ////////////////////////////////////////////////////////////////////////////////
700 /// Slot for visibility level.
701 
703 {
706  Update();
707 }
708 
709 ////////////////////////////////////////////////////////////////////////////////
710 /// Slot for viewing volume and containers.
711 
713 {
715  if (!on) return;
716  if (fVolume->IsVisContainers() == on) return;
717  if (fVolume->IsRaytracing()) {
720  }
722  Update();
723 }
724 
725 ////////////////////////////////////////////////////////////////////////////////
726 /// Slot for viewing last leaves only.
727 
729 {
731  if (!on) return;
732  if (fVolume->IsVisLeaves() == on) return;
733  if (fVolume->IsRaytracing()) {
736  }
737  fVolume->SetVisLeaves(on);
738  Update();
739 }
740 
741 ////////////////////////////////////////////////////////////////////////////////
742 /// Slot for viewing volume only.
743 
745 {
747  if (!on) return;
748  if (fVolume->IsVisOnly() == on) return;
749  if (fVolume->IsRaytracing()) {
752  }
753  fVolume->SetVisOnly(on);
754  Update();
755 }
756 
757 ////////////////////////////////////////////////////////////////////////////////
758 /// Slot for raytracing.
759 
761 {
763  if (fVolume->IsRaytracing() == on) return;
764  fVolume->Raytrace(on);
765  Update();
766 }
767 
768 ////////////////////////////////////////////////////////////////////////////////
769 /// Modify division name.
770 
772 {
774 }
775 
776 ////////////////////////////////////////////////////////////////////////////////
777 /// Change division axis and preserve number of slices.
778 
780 {
781  Int_t iaxis = 1;
782  for (Int_t i=0; i<3; i++) {
783  if (fBDiv[i]->GetState()!=kButtonDown) continue;
784  iaxis = i+1;
785  break;
786  }
787  TGeoShape *shape = fVolume->GetShape();
788  if (!shape) {
790  return;
791  }
792  Double_t xlo, xhi;
793  shape->GetAxisRange(iaxis, xlo, xhi);
794  if (xhi <= xlo) {
796  return;
797  }
798  fEDivFrom->SetNumber(xlo);
799  fEDivStep->SetNumber(0);
801 }
802 
803 ////////////////////////////////////////////////////////////////////////////////
804 /// Handle division range modification.
805 
807 {
808  Double_t min, max, xlo, xhi, step;
809  Int_t iaxis = 1;
810  Int_t ndiv;
811  for (Int_t i=0; i<3; i++) {
812  if (fBDiv[i]->GetState()!=kButtonDown) continue;
813  iaxis = i+1;
814  break;
815  }
816  TGeoShape *shape = fVolume->GetShape();
817  if (!shape) {
819  return;
820  }
821  shape->GetAxisRange(iaxis, xlo, xhi);
822  if (xhi-xlo <= 0) {
824  return;
825  }
826  min = fEDivFrom->GetNumber();
827  step = fEDivStep->GetNumber();
828  ndiv = fEDivN->GetIntNumber();
829  if (min<xlo) {
830  min = xlo;
831  fEDivFrom->SetNumber(xlo);
832  }
833  max = min + ndiv*step;
834  if (max>xhi) {
835  max = xhi;
836  step = (max-min)/ndiv;
837  fEDivStep->SetNumber(step);
838  }
839  if (min>=max) {
841  return;
842  }
844 }
845 
846 ////////////////////////////////////////////////////////////////////////////////
847 /// Handle division step modification.
848 
850 {
851  Double_t min, max, xlo, xhi;
852  Int_t iaxis = 1;
853  for (Int_t i=0; i<3; i++) {
854  if (fBDiv[i]->GetState()!=kButtonDown) continue;
855  iaxis = i+1;
856  break;
857  }
858  TGeoShape *shape = fVolume->GetShape();
859  if (!shape) {
861  return;
862  }
863  shape->GetAxisRange(iaxis, xlo, xhi);
864  if (xhi-xlo <= 0) {
866  return;
867  }
868  min = fEDivFrom->GetNumber();
869  Double_t step = fEDivStep->GetNumber();
870  Int_t ndiv = fEDivN->GetIntNumber();
871  max = min + ndiv*step;
872 
873  // Check if ndiv*step < max-min
874  if (max <= xhi) {
876  return;
877  }
878  // Step too big - set value to fit range
879  max = xhi;
880  step = (max-min)/ndiv;
881  fEDivStep->SetNumber(step);
882  if (step < 0) {
884  return;
885  }
887 }
888 
889 ////////////////////////////////////////////////////////////////////////////////
890 /// Handle division N modification.
891 
893 {
894  Double_t min, max, xlo, xhi;
895  Int_t iaxis = 1;
896  for (Int_t i=0; i<3; i++) {
897  if (fBDiv[i]->GetState()!=kButtonDown) continue;
898  iaxis = i+1;
899  break;
900  }
901  TGeoShape *shape = fVolume->GetShape();
902  if (!shape) {
904  return;
905  }
906  shape->GetAxisRange(iaxis, xlo, xhi);
907  if (xhi-xlo <= 0) {
909  return;
910  }
911  Double_t step = fEDivStep->GetNumber();
912  // If step=0 it is discounted
913  if (step==0) {
915  return;
916  }
917  Int_t ndiv = fEDivN->GetIntNumber();
918  min = fEDivFrom->GetNumber();
919  max = min + ndiv*step;
920  // Check if ndiv*step < max-min
921  if (max <= xhi) {
923  return;
924  }
925  max = xhi;
926  ndiv = (Int_t)((max-min)/step);
927  fEDivN->SetNumber(ndiv);
929 }
930 
931 ////////////////////////////////////////////////////////////////////////////////
932 /// Apply current division settings
933 
935 {
936  Double_t xlo, xhi, step;
937  Int_t iaxis = 1;
938  Int_t ndiv;
939  for (Int_t i=0; i<3; i++) {
940  if (fBDiv[i]->GetState()!=kButtonDown) continue;
941  iaxis = i+1;
942  break;
943  }
944  TGeoShape *shape = fVolume->GetShape();
945  if (!shape) {
947  return;
948  }
949  shape->GetAxisRange(iaxis, xlo, xhi);
950  if (xhi-xlo <= 0) {
952  return;
953  }
954  xlo = fEDivFrom->GetNumber();
955  step = fEDivStep->GetNumber();
956  ndiv = fEDivN->GetIntNumber();
957  TGeoPatternFinder *finder = fVolume->GetFinder();
958  if (finder) {
959  // we have to remove first the existing division
960  TObjArray *nodes = fVolume->GetNodes();
961  nodes->Delete();
962  nodes->Clear();
963  delete finder;
964  fVolume->SetFinder(0);
965  }
966  fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
969  Update();
970 // fVolume->Draw();
971 }
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:298
Geometrical transformation package.
Definition: TGeoMatrix.h:38
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:329
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:131
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:129
#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 hirarchically 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:250
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:436
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:71
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:92
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:336
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:81
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
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:91
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:24
TGeoTabManager * fTabMgr
Definition: TGeoGedFrame.h:25
UInt_t GetDefaultHeight() const
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
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.