95 Int_t nframes = list->GetSize();
97 for (
Int_t i = 0; i < nframes; i++) {
237 for (
Int_t i = 0; i < ntabs; i++) {
238 tel =
fTab->GetTabTab(i);
315 fLT->Associate(
this);
321 gClient->GetColorByName(
"#0000ff", color);
358 name =
"Selected: -none-";
398 parent_item =
fLT->AddItem(parent_item,
"Volume hierarchy", pic_fldo, pic_fld);
399 parent_item->
SetTipText(
"Select a volume from the existing hierarchy");
400 fLT->OpenItem(parent_item);
403 parent_item =
fLT->AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fileo, pic_file);
405 fLT->SetSelected(parent_item);
407 parent_item =
fLT->AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fldo, pic_fld);
409 fLT->SetSelected(parent_item);
412 parent_item =
fLT->AddItem(
nullptr,
"Other volumes", pic_fldo, pic_fld);
413 parent_item->
SetTipText(
"Select a volume from the list of unconnected volumes");
419 fLT->AddItem(parent_item, vol->
GetName(), vol, pic_fileo, pic_file);
456 Int_t i, j, ind, icopy;
458 for (i = 0; i < nd; i++) {
460 crtnode = parent_vol->
GetNode(i);
463 ind = parent_vol->
GetIndex(crtnode);
464 for (j = 0; j < ind; j++)
470 for (j = ind + 1; j < nd; j++)
473 daughter_item =
fLT->AddItem(
488 fClose->Connect(
"Clicked()",
"TGeoVolumeDialog",
this,
"DoClose()");
489 fLT->Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoVolumeDialog",
this,
"DoItemClick(TGListTreeItem *, Int_t)");
518 const char *shapename;
524 for (
Int_t i = 0; i < nshapes; i++) {
529 pic_shape =
fClient->GetMimeTypeList()->GetIcon(shapename,
kTRUE);
530 fld_name = shapename;
532 fld_name +=
" Shapes";
533 parent_item =
fLT->FindChildByName(
nullptr, fld_name.
Data());
535 parent_item =
fLT->AddItem(
nullptr, fld_name.
Data(), pic_fldo, pic_fld);
538 fLT->AddItem(parent_item, shape->
GetName(), shape, pic_shape, pic_shape);
568 fClose->Connect(
"Clicked()",
"TGeoShapeDialog",
this,
"DoClose()");
569 fLT->Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoShapeDialog",
this,
"DoItemClick(TGListTreeItem *, Int_t)");
600 for (
Int_t i = 0; i < nmed; i++) {
602 fLT->AddItem(
nullptr, med->
GetName(), med, pic_med, pic_med);
633 fClose->Connect(
"Clicked()",
"TGeoMediumDialog",
this,
"DoClose()");
634 fLT->Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMediumDialog",
this,
"DoItemClick(TGListTreeItem *, Int_t)");
665 for (
Int_t i = 0; i < nmat; i++) {
667 fLT->AddItem(
nullptr, mat->
GetName(), mat, pic_mat, pic_mat);
698 fClose->Connect(
"Clicked()",
"TGeoMaterialDialog",
this,
"DoClose()");
699 fLT->Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMaterialDialog",
this,
"DoItemClick(TGListTreeItem *, Int_t)");
733 for (
Int_t i = 0; i < nmat; i++) {
737 if (!strcmp(matrix->
IsA()->
GetName(),
"TGeoTranslation")) {
739 parent_item =
fLT->FindChildByName(
nullptr,
"Translations");
741 parent_item =
fLT->AddItem(
nullptr,
"Translations", pic, pic);
742 parent_item->
SetTipText(
"List of translations");
744 }
else if (!strcmp(matrix->
IsA()->
GetName(),
"TGeoRotation")) {
746 parent_item =
fLT->FindChildByName(
nullptr,
"Rotations");
748 parent_item =
fLT->AddItem(
nullptr,
"Rotations", pic, pic);
751 }
else if (!strcmp(matrix->
IsA()->
GetName(),
"TGeoCombiTrans") ||
752 !strcmp(matrix->
IsA()->
GetName(),
"TGeoHMatrix")) {
754 parent_item =
fLT->FindChildByName(
nullptr,
"Combined");
756 parent_item =
fLT->AddItem(
nullptr,
"Combined", pic, pic);
757 parent_item->
SetTipText(
"List of combined transformations");
761 fLT->AddItem(parent_item, matrix->
GetName(), matrix, pic, pic);
792 fClose->Connect(
"Clicked()",
"TGeoMatrixDialog",
this,
"DoClose()");
793 fLT->Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMatrixDialog",
this,
"DoItemClick(TGListTreeItem *, Int_t)");
823 gROOT->GetListOfCleanups()->Add(
this);
824 fClose->Connect(
"Clicked()",
"TGeoTransientPanel",
this,
"Hide()");
835 gROOT->GetListOfCleanups()->Remove(
this);
845 gROOT->GetListOfCleanups()->Remove(
this);
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
externTGeoManager * gGeoManager
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
const TGWindow * GetRoot() const
Returns current root (i.e.
void SetRoot(TGWindow *root=nullptr)
Sets the current root (i.e.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void MapWindow() override
map window
void Move(Int_t x, Int_t y) override
Move frame.
TClass * IsA() const override
virtual void DeleteWindow()
Delete window.
void UnmapWindow() override
unmap window
This class handles GUI labels.
This class describes layout hints used by the layout classes.
TGListTreeItem * GetFirstChild() const
virtual void SetTipText(const char *)
virtual void * GetUserData() const =0
A list tree is a widget that can contain a number of items arranged in a tree structure.
TGMainFrame(const TGMainFrame &)=delete
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
TGClient * fClient
Connection to display server.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Service classes of the tab widget.
const char * GetString() const
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Yield an action as soon as it is clicked.
TGTransientFrame(const TGTransientFrame &)=delete
ROOT GUI Window base class.
virtual TVirtualPad * GetPad() const
static void SetFrameCreator(TGedEditor *e)
Set the TGedEditor that currently creates TGedFrames.
Base frame for implementing GUI - a service class.
void SetModelClass(TClass *mcl)
void ConnectSignalsToSlots() override
Connect signals to slots.
TGeoMaterialDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
void DoItemClick(TGListTreeItem *item, Int_t btn) override
Handle item click.
void DoClose() override
Handle close button.
void BuildListTree() override
Build volume specific list tree.
Base class describing materials.
virtual Bool_t IsMixture() const
void DoItemClick(TGListTreeItem *item, Int_t btn) override
Handle item click.
void DoClose() override
Handle close button.
void ConnectSignalsToSlots() override
Connect signals to slots.
TGeoMatrixDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
void BuildListTree() override
Build matrix specific list tree.
Geometrical transformation package.
TClass * IsA() const override
Bool_t IsIdentity() const
void ConnectSignalsToSlots() override
Connect signals to slots.
void DoClose() override
Handle close button.
void BuildListTree() override
Build volume specific list tree.
void DoItemClick(TGListTreeItem *item, Int_t btn) override
Handle item click.
TGeoMediumDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
Media are used to store properties related to tracking and which are useful only when using geometry ...
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoVolume * GetVolume() const
void BuildListTree() override
Build shape specific list tree.
TGeoShapeDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
void ConnectSignalsToSlots() override
Connect signals to slots.
void DoClose() override
Handle close button.
void DoItemClick(TGListTreeItem *item, Int_t btn) override
Handle item click.
Base abstract class for all shapes.
const char * GetName() const override
Get the shape name.
TClass * IsA() const override
void GetVolumeEditor(TGeoVolume *vol)
Get editor for a volume.
TGeoTransientPanel * fMaterialPanel
TGCompositeFrame * fVolumeTab
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static TMap fgEditorToMgrMap
void GetMaterialEditor(TGeoMaterial *material)
Get editor for a material.
void GetEditors(TClass *cl)
Get editor for a class.
static TGeoTabManager * GetMakeTabManager(TGedEditor *ged)
Static method to return the tab manager currently appended to the pad or create one if not existing.
void SetModel(TObject *model)
Send the SetModel signal to all editors in the tab TYPE.
Int_t GetTabIndex() const
Get index for a given tab element.
TGeoTransientPanel * fShapePanel
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
TGeoTransientPanel * fMediumPanel
TGeoTabManager(TGedEditor *ged)
Ctor.
void SetTab()
Set a given tab element as active one.
~TGeoTabManager() override
Dtor.
void SetVolTabEnabled(Bool_t flag=kTRUE)
Enable/disable tabs.
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
TGeoTransientPanel * fMatrixPanel
virtual void Hide()
Hide the transient frame.
void CloseWindow() override
When closed via WM close button, just unmap (i.e.
TGeoTransientPanel(TGedEditor *ged, const char *name, TObject *obj)
Transient panel ctor.
void GetEditors(TClass *cl)
Get editor for a class.
virtual void Show()
Hide the transient frame.
virtual void DeleteEditors()
Delete editors.
TGCompositeFrame * fTabContainer
TGCompositeFrame * fStyle
void SetModel(TObject *model)
Update the editors in the main tab to reflect the selected object.
~TGeoTransientPanel() override
Destructor.
static TObject * fgSelectedObj
~TGeoTreeDialog() override
Destructor.
static TObject * GetSelected()
static; return selected object
void DoSelect(TGListTreeItem *item)
Update dialog to reflect current clicked object.
TGeoTreeDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Constructor.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Int_t GetNdaughters() const
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
TObject()
TObject constructor.
Class used by TMap to store (key,value) pairs.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
int main(int argc, char **argv)