Logo ROOT   6.10/09
Reference Guide
TGeoVolumeEditor.h
Go to the documentation of this file.
1 // @(#):$Id$
2 // Author: M.Gheata
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGeoVolumeEditor
13 #define ROOT_TGeoVolumeEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TGeoVolumeEditor //
18 // //
19 // Editor for a TGeoVolume. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGWidget.h"
24 #include "TGeoGedFrame.h"
25 
26 class TGeoManager;
27 class TGeoVolume;
28 class TGeoShape;
29 class TGeoMedium;
30 class TGeoMaterial;
31 class TGeoMatrix;
32 class TGTextEntry;
33 class TGNumberEntry;
34 class TGTab;
35 class TGComboBox;
36 class TGTextButton;
37 class TGPictureButton;
38 class TGCheckButton;
39 class TGRadioButton;
40 class TGShutter;
41 class TGShutterItem;
42 class TGeoTabManager;
43 
45 
46 protected:
47 
48  TGeoManager *fGeometry; // Selected geometry manager
49  TGeoVolume *fVolume; // Volume object
50  Bool_t fIsModified; // Flag that volume was modified
51  Bool_t fIsAssembly; // Flag that the volume is an assembly
52  Bool_t fIsDivided; // Flag that the volume is divided
53  TGShutter *fCategories; // Categories shutter
54  TGTextEntry *fVolumeName; // Volume name text entry
55 // TGComboBox *fShapeList; // All-shapes combo box
56  TGeoShape *fSelectedShape; // Selected shape
57  TGLabel *fLSelShape; // Selected shape label
58  TGPictureButton *fBSelShape; // Button for selecting a shape
59 // TGComboBox *fMediaList; // All-media combo box
60  TGeoMedium *fSelectedMedium; // Selected medium
61  TGLabel *fLSelMedium; // Selected medium label
62  TGPictureButton *fBSelMedium; // Button for selecting a medium
63 // TGComboBox *fVolumeList; // All-volume combo box
64  TGeoVolume *fSelectedVolume; // Selected volume
65  TGLabel *fLSelVolume; // Selected volume label
66  TGPictureButton *fBSelVolume; // Button for selecting a volume
67 // TGComboBox *fMatrixList; // All-matrix combo box
68  TGeoMatrix *fSelectedMatrix; // Selected matrix
69  TGLabel *fLSelMatrix; // Selected matrix label
70  TGPictureButton *fBSelMatrix; // Button for selecting a matrix
71  TGNumberEntry *fCopyNumber; // Node copy number
72  TGTextButton *fAddNode; // Button for adding a node
73  TGTextButton *fEditShape; // Check button for shape editing
74  TGTextButton *fEditMedium; // Check button for medium editing
75  TGComboBox *fNodeList; // Daughters combo box
76  TGTextButton *fEditMatrix; // Button for editing the position of a daughter
77  TGTextButton *fRemoveNode; // Button for removing a daughter
78  TGCheckButton *fBVis[2]; // Buttons for setting vis. on/off
79  TGRadioButton *fBView[3]; // Radio for selecting view options
80  TGCheckButton *fBRaytrace; // Raytracing on/off
81  TGCheckButton *fBAuto; // Check button for auto vis level
82  TGNumberEntry *fEVisLevel; // Number entry for visibility level
83  TGTextButton *fApplyDiv; // Button for applying division settings
84  TGTextEntry *fDivName; // Division volume name text entry
85  TGRadioButton *fBDiv[3]; // Radio for selecting division type
86  TGNumberEntry *fEDivFrom; // Number entry for division start
87  TGNumberEntry *fEDivStep; // Number entry for division step
88  TGNumberEntry *fEDivN; // Number entry for division Nslices
89 
90  virtual void ConnectSignals2Slots(); // Connect the signals to the slots
91 
92 public:
93  TGeoVolumeEditor(const TGWindow *p = 0,
94  Int_t width = 140, Int_t height = 30,
95  UInt_t options = kChildFrame,
97  virtual ~TGeoVolumeEditor();
98  virtual void SetModel(TObject *obj);
99  virtual void ActivateBaseClassEditors(TClass* cl);
100 
101  void DoAddNode();
102  void DoVolumeName();
103  void DoSelectShape();
104  void DoSelectMedium();
105  void DoSelectMatrix();
106  void DoSelectVolume();
107  void DoEditShape();
108  void DoEditMedium();
109  void DoEditMatrix();
110  void DoRemoveNode();
111  void DoVisVolume();
112  void DoVisDaughters();
113  void DoVisAuto();
114  void DoVisLevel();
115  void DoViewAll();
116  void DoViewLeaves();
117  void DoViewOnly();
118  void DoDivSelAxis();
119  void DoDivFromTo();
120  void DoDivStep();
121  void DoDivN();
122  void DoDivName();
123  void DoApplyDiv();
124  void DoRaytrace();
125 
126  ClassDef(TGeoVolumeEditor,0) // TGeoVolume editor
127 };
128 
129 #endif
TGeoVolume * fSelectedVolume
void DoDivN()
Handle division N modification.
TGeoMedium * fSelectedMedium
void DoRemoveNode()
Remove a daughter.
virtual ~TGeoVolumeEditor()
Destructor.
void DoRaytrace()
Slot for raytracing.
virtual void ConnectSignals2Slots()
Connect signals to slots.
The manager class for any TGeo geometry.
Definition: TGeoManager.h:37
void DoDivSelAxis()
Change division axis and preserve number of slices.
Definition: TGTab.h:62
Geometrical transformation package.
Definition: TGeoMatrix.h:38
void DoSelectMatrix()
Select a matrix for positioning.
TGTextButton * fApplyDiv
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.
TGeoMatrix * fSelectedMatrix
TGNumberEntry * fEVisLevel
void DoAddNode()
Add a daughter.
TGTextEntry * fDivName
Base class describing materials.
Definition: TGeoMaterial.h:29
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void DoVolumeName()
Modify volume name.
void DoEditMedium()
Edit the medium of the volume.
void DoViewLeaves()
Slot for viewing last leaves only.
TGeoVolume * fVolume
void DoDivName()
Modify division name.
TGTextButton * fEditMedium
TGNumberEntry * fEDivStep
virtual void SetModel(TObject *obj)
Connect to the picked volume.
TGComboBox * fNodeList
#define ClassDef(name, id)
Definition: Rtypes.h:297
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGTextButton * fEditMatrix
TGTextEntry * fVolumeName
void DoVisDaughters()
Slot for setting daughters visible/invisible.
void DoApplyDiv()
Apply current division settings.
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
TGShutter * fCategories
TGCheckButton * fBVis[2]
TGPictureButton * fBSelShape
Base abstract class for all shapes.
Definition: TGeoShape.h:25
void DoViewOnly()
Slot for viewing volume only.
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.
TGPictureButton * fBSelMatrix
TGTextButton * fRemoveNode
virtual void ActivateBaseClassEditors(TClass *cl)
Add editors to fGedFrame and exclude TLineEditor.
TGRadioButton * fBDiv[3]
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:23
void DoSelectMedium()
Select a new medium.
TGCheckButton * fBRaytrace
TGNumberEntry * fCopyNumber
Mother of all ROOT objects.
Definition: TObject.h:37
TGRadioButton * fBView[3]
TGTextButton * fEditShape
void DoDivFromTo()
Handle division range modification.
void DoEditShape()
Edit the shape of the volume.
void DoDivStep()
Handle division step modification.
TGPictureButton * fBSelVolume
void DoViewAll()
Slot for viewing volume and containers.
TGNumberEntry * fEDivN
TGPictureButton * fBSelMedium
TGNumberEntry * fEDivFrom
void DoSelectVolume()
Select a daughter volume.
TGeoManager * fGeometry
TGeoShape * fSelectedShape