Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoManagerEditor.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_TGeoManagerEditor
13#define ROOT_TGeoManagerEditor
14
15#include "TGWidget.h"
16#include "TGeoGedFrame.h"
17
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;
35
37
38protected:
39 TGeoManager *fGeometry; // Selected geometry manager
40 TGeoTabManager *fTabMgr; // Tab manager
41 TGTab *fTab; // TGTab of GedEditor
42 TGCompositeFrame *fVolumeTab; // Tab of Volume tab
43 Bool_t fIsModified; // Flag that manager was modified
44 TGShutter *fCategories; // Categories shutter
45 TGTextEntry *fManagerName; // Name text entry
46 TGTextEntry *fManagerTitle; // Title text entry
47 TGTextEntry *fMediumName; // Medium name text entry
48 TGTextEntry *fMatrixName; // Matrix name text entry
49 TGTextEntry *fMaterialName; // Material name text entry
50 TGTextEntry *fVolumeName; // Volume name text entry
51 TGeoMaterial *fSelectedMaterial; // Selected material
52 TGeoMaterial *fSelectedMaterial2; // Selected material for medium creation
53 TGLabel *fLSelMaterial; // Selected material label
54 TGLabel *fLSelMaterial2; // Selected material label
55 TGPictureButton *fBSelMaterial; // Button for selecting a material
56 TGPictureButton *fBSelMaterial2; // Button for selecting a material
57 TGeoVolume *fSelectedVolume; // Selected volume
58 TGLabel *fLSelVolume; // Selected volume label
59 TGPictureButton *fBSelVolume; // Button for selecting a volume
60 TGeoShape *fSelectedShape; // Selected shape
61 TGeoShape *fSelectedShape2; // Selected shape for volume creation
62 TGLabel *fLSelShape; // Selected shape label
63 TGLabel *fLSelShape2; // Selected shape label
64 TGPictureButton *fBSelShape; // Button for selecting a shape
65 TGPictureButton *fBSelShape2; // Button for selecting a shape
66 TGeoMatrix *fSelectedMatrix; // Selected matrix
67 TGLabel *fLSelMatrix; // Selected matrix label
68 TGPictureButton *fBSelMatrix; // Button for selecting a matrix
69 TGeoMedium *fSelectedMedium; // Selected medium
70 TGeoMedium *fSelectedMedium2; // Selected medium for volume creation
71 TGLabel *fLSelMedium; // Selected medium label
72 TGLabel *fLSelMedium2; // Selected medium label
73 TGPictureButton *fBSelMedium; // Button for selecting a medium
74 TGPictureButton *fBSelMedium2; // Button for selecting a medium
75 TGPictureButton *fShapeButton[21]; // List of shape buttons
76 TGPictureButton *fMatrixButton[3]; // List of matrix buttons
77 TGPictureButton *fVolumeButton[2]; // List of volume buttons
78 TGPictureButton *fMaterialButton[2]; // List of material buttons
79 TGRadioButton *fExportOption[2]; // Export option buttons
80 TGTextButton *fExportButton; // Button to export geometry
81 TGComboBox *fElementList; // Combo box for elements
82 TGNumberEntry *fEntryDensity; // Number entry for material density
83 TGPictureButton *fMediumButton; // Button to create a medium
84 TGNumberEntry *fMediumId; // Medium ID number entry
85 TGTextButton *fEditShape; // Button for editing selected shape
86 TGTextButton *fEditMedium; // Button for editing a medium
87 TGTextButton *fEditMaterial; // Button for editing a material
88 TGTextButton *fEditMatrix; // Button for editing a matrix
89 TGTextButton *fEditVolume; // Button for editing a volume
90 TGTextButton *fSetTopVolume; // Button for setting top volume
91 TGLabel *fLSelTop; // Selected top volume
92 TGPictureButton *fBSelTop; // Button for selecting top volume
93 TGTextButton *fCloseGeometry; // Button for closing the geometry
94 TGCompositeFrame *f2; // Parent frame for shape editing
95 TGCompositeFrame *f3; // Parent frame for volume editing
96 TGCompositeFrame *f4; // Parent frame for materials editing
97 TGCompositeFrame *f5; // Parent frame for media editing
98 TGCompositeFrame *f6; // Parent frame for matrices editing
99 TGCompositeFrame *f7; // Parent frame for closing geometry
100 TCanvas *fConnectedCanvas; // Canvas connected to SelectedSlot()
101
102 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
103 void ShowSelectShape(Bool_t show = kTRUE);
104 void ShowSelectVolume(Bool_t show = kTRUE);
105 void ShowSelectMaterial(Bool_t show = kTRUE);
106 void ShowSelectMedium(Bool_t show = kTRUE);
107 void ShowSelectMatrix(Bool_t show = kTRUE);
108
109public:
110 TGeoManagerEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
112 ~TGeoManagerEditor() override;
113 static void LoadLib();
114 void SetModel(TObject *obj) override;
115
116 virtual void SelectedSlot(TVirtualPad *pad, TObject *obj, Int_t event);
118 void DisconnectSelected();
119
120 void DoName();
121 void DoCreateBox();
122 void DoCreatePara();
123 void DoCreateTrd1();
124 void DoCreateTrd2();
125 void DoCreateTrap();
126 void DoCreateGtra();
127 void DoCreateXtru();
128 void DoCreateArb8();
129 void DoCreateTube();
130 void DoCreateTubs();
131 void DoCreateCone();
132 void DoCreateCons();
133 void DoCreateSphe();
134 void DoCreateCtub();
135 void DoCreateEltu();
136 void DoCreateTorus();
137 void DoCreatePcon();
138 void DoCreatePgon();
139 void DoCreateHype();
140 void DoCreateParab();
141 void DoCreateComposite();
142 void DoCreateMaterial();
143 void DoCreateMixture();
144 void DoCreateMedium();
145 void DoCreateTranslation();
146 void DoCreateRotation();
147 void DoCreateCombi();
148 void DoCreateVolume();
149 void DoCreateAssembly();
150 void DoEditShape();
151 void DoEditVolume();
152 void DoEditMedium();
153 void DoEditMaterial();
154 void DoEditMatrix();
155 void DoSelectShape();
156 void DoSelectShape2();
157 void DoSelectVolume();
158 void DoSelectMatrix();
159 void DoSelectMaterial();
160 void DoSelectMaterial2();
161 void DoSelectMedium();
162 void DoSelectMedium2();
163 void DoSetTopVolume();
164 void DoSelectTopVolume();
165 void DoExportGeometry();
166 void DoCloseGeometry();
167
168 ClassDefOverride(TGeoManagerEditor, 0) // TGeoManager editor
169};
170
171#endif
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define c(i)
Definition RSha256.hxx:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
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:321
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
Definition TGShutter.h:55
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.
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.
void SetModel(TObject *obj) override
Refresh editor according the selected obj.
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.
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
~TGeoManagerEditor() override
Destructor.
void ShowSelectMedium(Bool_t show=kTRUE)
Show/hide interface for medium selection.
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.
static void LoadLib()
Dummy static function, used to load plugin.
TGPictureButton * fMaterialButton[2]
TGNumberEntry * fEntryDensity
void DoEditShape()
Slot for editing selected shape.
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:44
Base class describing materials.
Geometrical transformation package.
Definition TGeoMatrix.h:38
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:23
Base abstract class for all shapes.
Definition TGeoShape.h:25
Manager for all editor tabs.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
Mother of all ROOT objects.
Definition TObject.h:41
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51