Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
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 *************************************************************************/
12#ifndef ROOT_TGeoManagerEditor
13#define ROOT_TGeoManagerEditor
15#include "TGWidget.h"
16#include "TGeoGedFrame.h"
18class TGeoManager;
19class TGeoVolume;
20class TGeoShape;
21class TGeoMedium;
22class TGeoMaterial;
23class TGeoMatrix;
24class TGShutter;
25class TGShutterItem;
26class TGTextEntry;
27class TGTab;
28class TGComboBox;
29class TGNumberEntry;
30class TGTextButton;
31class TGPictureButton;
32class TGCheckButton;
33class TGRadioButton;
34class TGeoTabManager;
40 TGeoManager *fGeometry; // Selected geometry manager
41 TGeoTabManager *fTabMgr; // Tab manager
42 TGTab *fTab; // TGTab of GedEditor
43 TGCompositeFrame *fVolumeTab; // Tab of Volume tab
44 Bool_t fIsModified; // Flag that manager was modified
45 TGShutter *fCategories; // Categories shutter
46 TGTextEntry *fManagerName; // Name text entry
47 TGTextEntry *fManagerTitle; // Title text entry
48 TGTextEntry *fMediumName; // Medium name text entry
49 TGTextEntry *fMatrixName; // Matrix name text entry
50 TGTextEntry *fMaterialName; // Material name text entry
51 TGTextEntry *fVolumeName; // Volume name text entry
52 TGeoMaterial *fSelectedMaterial; // Selected material
53 TGeoMaterial *fSelectedMaterial2; // Selected material for medium creation
54 TGLabel *fLSelMaterial; // Selected material label
55 TGLabel *fLSelMaterial2; // Selected material label
56 TGPictureButton *fBSelMaterial; // Button for selecting a material
57 TGPictureButton *fBSelMaterial2; // Button for selecting a material
58 TGeoVolume *fSelectedVolume; // Selected volume
59 TGLabel *fLSelVolume; // Selected volume label
60 TGPictureButton *fBSelVolume; // Button for selecting a volume
61 TGeoShape *fSelectedShape; // Selected shape
62 TGeoShape *fSelectedShape2; // Selected shape for volume creation
63 TGLabel *fLSelShape; // Selected shape label
64 TGLabel *fLSelShape2; // Selected shape label
65 TGPictureButton *fBSelShape; // Button for selecting a shape
66 TGPictureButton *fBSelShape2; // Button for selecting a shape
67 TGeoMatrix *fSelectedMatrix; // Selected matrix
68 TGLabel *fLSelMatrix; // Selected matrix label
69 TGPictureButton *fBSelMatrix; // Button for selecting a matrix
70 TGeoMedium *fSelectedMedium; // Selected medium
71 TGeoMedium *fSelectedMedium2; // Selected medium for volume creation
72 TGLabel *fLSelMedium; // Selected medium label
73 TGLabel *fLSelMedium2; // Selected medium label
74 TGPictureButton *fBSelMedium; // Button for selecting a medium
75 TGPictureButton *fBSelMedium2; // Button for selecting a medium
76 TGPictureButton *fShapeButton[21]; // List of shape buttons
77 TGPictureButton *fMatrixButton[3]; // List of matrix buttons
78 TGPictureButton *fVolumeButton[2]; // List of volume buttons
79 TGPictureButton *fMaterialButton[2]; // List of material buttons
80 TGRadioButton *fExportOption[2]; // Export option buttons
81 TGTextButton *fExportButton; // Button to export geometry
82 TGComboBox *fElementList; // Combo box for elements
83 TGNumberEntry *fEntryDensity; // Number entry for material density
84 TGPictureButton *fMediumButton; // Button to create a medium
85 TGNumberEntry *fMediumId; // Medium ID number entry
86 TGTextButton *fEditShape; // Button for editing selected shape
87 TGTextButton *fEditMedium; // Button for editing a medium
88 TGTextButton *fEditMaterial; // Button for editing a material
89 TGTextButton *fEditMatrix; // Button for editing a matrix
90 TGTextButton *fEditVolume; // Button for editing a volume
91 TGTextButton *fSetTopVolume; // Button for setting top volume
92 TGLabel *fLSelTop; // Selected top volume
93 TGPictureButton *fBSelTop; // Button for selecting top volume
94 TGTextButton *fCloseGeometry; // Button for closing the geometry
95 TGCompositeFrame *f2; // Parent frame for shape editing
96 TGCompositeFrame *f3; // Parent frame for volume editing
97 TGCompositeFrame *f4; // Parent frame for materials editing
98 TGCompositeFrame *f5; // Parent frame for media editing
99 TGCompositeFrame *f6; // Parent frame for matrices editing
100 TGCompositeFrame *f7; // Parent frame for closing geometry
101 TCanvas *fConnectedCanvas; // Canvas connected to SelectedSlot()
103 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
104 void ShowSelectShape(Bool_t show=kTRUE);
105 void ShowSelectVolume(Bool_t show=kTRUE);
107 void ShowSelectMedium(Bool_t show=kTRUE);
108 void ShowSelectMatrix(Bool_t show=kTRUE);
111 TGeoManagerEditor(const TGWindow *p = 0,
112 Int_t width = 140, Int_t height = 30,
113 UInt_t options = kChildFrame,
115 virtual ~TGeoManagerEditor();
116 static void LoadLib() {;}
117 virtual void SetModel(TObject *obj);
119 virtual void SelectedSlot(TVirtualPad* pad, TObject* obj, Int_t event);
121 void DisconnectSelected();
123 void DoName();
124 void DoCreateBox();
125 void DoCreatePara();
126 void DoCreateTrd1();
127 void DoCreateTrd2();
128 void DoCreateTrap();
129 void DoCreateGtra();
130 void DoCreateXtru();
131 void DoCreateArb8();
132 void DoCreateTube();
133 void DoCreateTubs();
134 void DoCreateCone();
135 void DoCreateCons();
136 void DoCreateSphe();
137 void DoCreateCtub();
138 void DoCreateEltu();
139 void DoCreateTorus();
140 void DoCreatePcon();
141 void DoCreatePgon();
142 void DoCreateHype();
143 void DoCreateParab();
144 void DoCreateComposite();
145 void DoCreateMaterial();
146 void DoCreateMixture();
147 void DoCreateMedium();
148 void DoCreateTranslation();
149 void DoCreateRotation();
150 void DoCreateCombi();
151 void DoCreateVolume();
152 void DoCreateAssembly();
153 void DoEditShape();
154 void DoEditVolume();
155 void DoEditMedium();
156 void DoEditMaterial();
157 void DoEditMatrix();
158 void DoSelectShape();
159 void DoSelectShape2();
160 void DoSelectVolume();
161 void DoSelectMatrix();
162 void DoSelectMaterial();
163 void DoSelectMaterial2();
164 void DoSelectMedium();
165 void DoSelectMedium2();
166 void DoSetTopVolume();
167 void DoSelectTopVolume();
168 void DoExportGeometry();
169 void DoCloseGeometry();
171 ClassDef(TGeoManagerEditor,0) // TGeoManager editor
@ kChildFrame
Definition: GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:45
unsigned int UInt_t
Definition: RtypesCore.h:46
bool Bool_t
Definition: RtypesCore.h:63
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDef(name, id)
Definition: Rtypes.h:325
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
The Canvas class.
Definition: TCanvas.h:23
Selects different options.
Definition: TGButton.h:264
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition: TGComboBox.h:47
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
This class handles GUI labels.
Definition: TGLabel.h:24
TGNumberEntry is a number entry input widget with up/down buttons.
Yield an action as soon as it is clicked.
Definition: TGButton.h:228
Selects different options.
Definition: TGButton.h:322
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
Definition: TGShutter.h:58
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition: TGTab.h:46
Yield an action as soon as it is clicked.
Definition: TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
ROOT GUI Window base class.
Definition: TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition: TGedFrame.h:27
Editor for TGeoManager class.
void DoCreateCons()
Create a cone segment.
void DoCreateArb8()
Create an arbitrary polygone with maximum 8 vertices sitting on 2 parallel planes.
void DoCreatePgon()
Create a polygone shape.
void DoSelectMedium()
Slot for selecting an existing medium.
TGeoMaterial * fSelectedMaterial
void DoCreateAssembly()
Create a new volume assembly.
TGNumberEntry * fMediumId
TGPictureButton * fBSelMedium2
void DoCreateHype()
Create a hyperboloid.
void ConnectSelected(TCanvas *c)
void DoSelectMaterial()
Slot for selecting an existing material.
TGeoTabManager * fTabMgr
TGCompositeFrame * fVolumeTab
TGPictureButton * fVolumeButton[2]
void DoSelectShape()
Slot for selecting an existing shape.
void DoEditVolume()
Slot for editing selected volume.
TGCompositeFrame * f5
void DoSelectShape2()
Slot for selecting a shape for making a volume.
TGeoManagerEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for manager editor.
TGPictureButton * fBSelMatrix
TGPictureButton * fMatrixButton[3]
TGPictureButton * fMediumButton
void DoEditMedium()
Slot for editing selected medium.
TGTextButton * fEditMedium
void DoCreatePara()
Create a parallelipiped.
void DoSelectTopVolume()
Slot for setting top geometry volume.
void DoCreateTubs()
Create a tube segment.
TGTextEntry * fMediumName
void DoCreateTrd1()
Create a Trd1.
TGTextButton * fEditVolume
TGeoMedium * fSelectedMedium2
void DoCreateGtra()
Create a twisted trapezoid.
TGTextButton * fEditMaterial
void DoEditMatrix()
Slot for editing selected matrix.
void DoCloseGeometry()
Slot for closing the geometry.
TGPictureButton * fBSelShape2
void DoCreateParab()
Create a paraboloid.
TGCompositeFrame * f2
void DoSelectMedium2()
Slot for selecting an existing medium for making a volume.
void DoCreateBox()
Create a box.
TGComboBox * fElementList
void DoSetTopVolume()
Set top volume for the geometry.
TGTextButton * fEditShape
TGTextEntry * fManagerName
void DoSelectVolume()
Slot for selecting an existing volume.
void DoName()
Change name/title of the geometry.
void DoEditMaterial()
Slot for editing selected material.
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGCompositeFrame * f3
void DoCreateTranslation()
Create a new translation.
void DoCreateMixture()
Create a new mixture.
TGPictureButton * fBSelMaterial
TGeoMaterial * fSelectedMaterial2
TGTextEntry * fVolumeName
TGPictureButton * fBSelVolume
void ShowSelectMaterial(Bool_t show=kTRUE)
Show/hide interface for material selection.
void DoCreateTrd2()
Create a Trd2.
TGeoMatrix * fSelectedMatrix
void DoCreateVolume()
Create a new volume.
void DoCreateCone()
Create a cone.
void DoCreateXtru()
Create an extruded polygone.
TGTextButton * fSetTopVolume
TGCompositeFrame * f4
TGeoShape * fSelectedShape
TGeoVolume * fSelectedVolume
void DoExportGeometry()
Export geometry as .root or .C file.
TGTextEntry * fMatrixName
void DoCreateTube()
Create a tube.
TGPictureButton * fBSelMaterial2
TGTextButton * fEditMatrix
TGTextButton * fExportButton
TGeoMedium * fSelectedMedium
TGTextEntry * fMaterialName
TGCompositeFrame * f6
void DoCreatePcon()
Create a polycone shape.
TGTextEntry * fManagerTitle
TGCompositeFrame * f7
void DoCreateTorus()
Create a torus shape.
void DoCreateTrap()
Create a general trapezoid.
TGTextButton * fCloseGeometry
void DoCreateSphe()
Create a sphere.
static void LoadLib()
TGPictureButton * fBSelShape
TGRadioButton * fExportOption[2]
void DoSelectMaterial2()
Slot for selecting an existing material and making a medium.
void DoCreateMaterial()
Create a new material.
TGPictureButton * fBSelTop
TGeoManager * fGeometry
void ShowSelectMedium(Bool_t show=kTRUE)
Show/hide interface for medium selection.
TGShutter * fCategories
virtual void SelectedSlot(TVirtualPad *pad, TObject *obj, Int_t event)
Connected to TCanvas::Selected.
TGeoShape * fSelectedShape2
void ShowSelectVolume(Bool_t show=kTRUE)
Show/hide interface for volume selection.
void DoCreateMedium()
Create a new medium.
void ShowSelectShape(Bool_t show=kTRUE)
Show/hide interface for shape selection.
void ShowSelectMatrix(Bool_t show=kTRUE)
Show/hide interface for matrix selection.
void DoSelectMatrix()
Slot for selecting an existing matrix.
TGPictureButton * fMaterialButton[2]
TGNumberEntry * fEntryDensity
void DoEditShape()
Slot for editing selected shape.
virtual ~TGeoManagerEditor()
virtual void SetModel(TObject *obj)
Refresh editor according the selected obj.
void DoCreateEltu()
Create an elliptical tube.
void DoCreateCombi()
Create a new translation + rotation.
void DoCreateComposite()
Create a composite shape.
void DoCreateRotation()
Create a new rotation.
TGPictureButton * fBSelMedium
TGPictureButton * fShapeButton[21]
void DoCreateCtub()
Create a cut tube.
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
Base class describing materials.
Definition: TGeoMaterial.h:36
Geometrical transformation package.
Definition: TGeoMatrix.h:41
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:24
Base abstract class for all shapes.
Definition: TGeoShape.h:26
Manager for all editor tabs.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
Mother of all ROOT objects.
Definition: TObject.h:37
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51