66 fgEditorToMgrMap.Add(ged,
this);
91 for (
Int_t i=0; i<nframes; i++) {
158 if (!material)
return;
160 if (material->
IsMixture()) name =
"Mixture";
199 if (!ged)
return NULL;
218 for (
Int_t i=0; i<ntabs; i++) {
220 if (tel && !strcmp(tel->
GetString(),tabname.
Data()))
return i;
234 if (el->
fFrame == fr)
break;
283 return fgSelectedObj;
301 gClient->GetColorByName(
"#0000ff", color);
339 name =
"Selected: -none-";
380 parent_item =
fLT->
AddItem(parent_item,
"Volume hierarchy", pic_fldo, pic_fld);
381 parent_item->
SetTipText(
"Select a volume from the existing hierarchy");
385 parent_item =
fLT->
AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fileo, pic_file);
389 parent_item =
fLT->
AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fldo, pic_fld);
394 parent_item =
fLT->
AddItem(
NULL,
"Other volumes", pic_fldo, pic_fld);
395 parent_item->
SetTipText(
"Select a volume from the list of unconnected volumes");
436 for (i=0; i<nd; i++) {
438 crtnode = parent_vol->
GetNode(i);
441 ind = parent_vol->
GetIndex(crtnode);
442 for (j=0; j<ind; j++)
if (parent_vol->
GetNode(j)->
GetVolume() == vol)
break;
445 for (j=ind+1; j<nd; j++)
if (parent_vol->
GetNode(j)->
GetVolume() == vol) icopy++;
458 fClose->
Connect(
"Clicked()",
"TGeoVolumeDialog",
this,
"DoClose()");
459 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoVolumeDialog",
this,
460 "DoItemClick(TGListTreeItem *, Int_t)");
490 const char *shapename;
493 if (!nshapes)
return;
495 for (
Int_t i=0; i<nshapes; i++) {
497 if (!shape)
continue;
498 shapename = shape->IsA()->
GetName();
500 fld_name = shapename;
502 fld_name +=
" Shapes";
536 fClose->
Connect(
"Clicked()",
"TGeoShapeDialog",
this,
"DoClose()");
537 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoShapeDialog",
this,
538 "DoItemClick(TGListTreeItem *, Int_t)");
568 for (
Int_t i=0; i<nmed; i++) {
599 fClose->
Connect(
"Clicked()",
"TGeoMediumDialog",
this,
"DoClose()");
600 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMediumDialog",
this,
601 "DoItemClick(TGListTreeItem *, Int_t)");
631 for (
Int_t i=0; i<nmat; i++) {
662 fClose->
Connect(
"Clicked()",
"TGeoMaterialDialog",
this,
"DoClose()");
663 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMaterialDialog",
this,
664 "DoItemClick(TGListTreeItem *, Int_t)");
698 for (
Int_t i=0; i<nmat; i++) {
701 if (!strcmp(matrix->IsA()->
GetName(),
"TGeoTranslation")) {
706 parent_item->
SetTipText(
"List of translations");
708 }
else if (!strcmp(matrix->IsA()->
GetName(),
"TGeoRotation")) {
715 }
else if (!strcmp(matrix->IsA()->
GetName(),
"TGeoCombiTrans") ||
716 !strcmp(matrix->IsA()->
GetName(),
"TGeoHMatrix")) {
721 parent_item->
SetTipText(
"List of combined transformations");
753 fClose->
Connect(
"Clicked()",
"TGeoMatrixDialog",
this,
"DoClose()");
754 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMatrixDialog",
this,
755 "DoItemClick(TGListTreeItem *, Int_t)");
768 fCan =
new TGCanvas(
this, 170, 100);
769 fTab =
new TGTab(fCan->GetViewPort(), 10, 10);
770 fCan->SetContainer(fTab);
772 fTab->Associate(fCan);
773 fTabContainer = fTab->AddTab(
name);
785 Resize(fTabContainer->GetDefaultWidth()+30, fTabContainer->GetDefaultHeight()+65);
787 gROOT->GetListOfCleanups()->Add(
this);
788 fClose->
Connect(
"Clicked()",
"TGeoTransientPanel",
this,
"Hide()");
799 gROOT->GetListOfCleanups()->Remove(
this);
809 gROOT->GetListOfCleanups()->Remove(
this);
821 TIter next(fStyle->GetList());
823 if (fr->
fFrame->IsA() == class2)
return;
824 TGClient *client = fGedEditor->GetClient();
844 GetEditors(model->IsA());
846 TIter next(fStyle->GetList());
849 ((
TGedFrame *)(el->fFrame))->SetModel(model);
852 Resize(fTabContainer->GetDefaultWidth()+30, fTabContainer->GetDefaultHeight()+65);
virtual const char * GetName() const
Returns name of object.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void DoClose()
Handle close button.
virtual ~TGeoTreeDialog()
Destructor.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
virtual void DoClose()
Handle close button.
void SetTab()
Set a given tab element as active one.
virtual void * GetUserData() const =0
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
void GetEditors(TClass *cl)
Get editor for a class.
virtual void BuildListTree()
Build shape specific list tree.
Geometrical transformation package.
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void DeleteEditors()
Delete editors.
const TGWindow * GetRoot() const
Returns current root (i.e.
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
TGeoTabManager(TGedEditor *ged)
Ctor.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
TGCompositeFrame * fVolumeTab
virtual void SetContainer(TGFrame *f)
virtual void Associate(const TGWindow *w)
Base class describing materials.
TGeoVolume * GetMasterVolume() const
void GetMaterialEditor(TGeoMaterial *material)
Get editor for a material.
TObject * At(Int_t idx) const
static void SetFrameCreator(TGedEditor *e)
Set the TGedEditor that currently creates TGedFrames.
void SetVolTabEnabled(Bool_t flag=kTRUE)
Enable/disable tabs.
virtual void Layout()
Layout the elements of the composite frame.
TList * GetListOfMaterials() const
Int_t GetNdaughters() const
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hirarchically all daughters of a composite frame.
TList * GetListOfMedia() const
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
virtual ~TGeoTransientPanel()
Destructor.
void DoSelect(TGListTreeItem *item)
Update dialog to reflect current clicked object.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void BuildListTree()
Build matrix specific list tree.
virtual void SetText(TGString *newText)
Set new text in label.
virtual void BuildListTree()
Build volume specific list tree.
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
virtual void ConnectSignalsToSlots()=0
TGCompositeFrame(const TGCompositeFrame &)
Bool_t IsIdentity() const
virtual TList * GetList() const
TGViewPort * GetViewPort() const
TGMimeTypes * GetMimeTypeList() const
virtual const char * GetName() const
Get the shape name.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
TGeoTransientPanel * fMatrixPanel
virtual void SetTipText(const char *)
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...
virtual void DoClose()
Handle close button.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
Base abstract class for all shapes.
void SetModel(TObject *model)
Update the editors in the main tab to reflect the selected object.
virtual ~TGeoTabManager()
Dtor.
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
static TGeoTabManager * GetMakeTabManager(TGedEditor *ged)
Static method to return the tab manager currently appended to the pad or create one if not existing...
TObjArray * GetListOfShapes() const
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Int_t GetEntriesFast() const
void GetVolumeEditor(TGeoVolume *vol)
Get editor for a volume.
TGeoTransientPanel * fShapePanel
void GetEditors(TClass *cl)
Get editor for a class.
The ROOT global object gROOT contains a list of all defined classes.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TGClient * GetClient() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static TObject * GetSelected()
static; return selected object
TObjArray * GetListOfMatrices() const
virtual void Move(Int_t x, Int_t y)
Move frame.
TVirtualPad * GetPad() const
void SetModel(TObject *model)
Send the SetModel signal to all editors in the tab TYPE.
TString & Remove(Ssiz_t pos)
Class used by TMap to store (key,value) pairs.
TGeoTreeDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Constructor.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
R__EXTERN TGeoManager * gGeoManager
virtual Bool_t IsMixture() const
Int_t GetTabIndex() const
Get index for a given tab element.
TGeoTransientPanel * fMediumPanel
TGeoTransientPanel * fMaterialPanel
virtual void DoClose()
Handle close button.
virtual void RaiseWindow()
TGListTreeItem * GetFirstChild() const
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
static TMap fgEditorToMgrMap
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
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.
Media are used to store properties related to tracking and which are useful only when using geometry ...
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Mother of all ROOT objects.
virtual void UnmapWindow()
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
virtual void Add(TObject *obj)
virtual void BuildListTree()
Build volume specific list tree.
static TObject * fgSelectedObj
TObjArray * GetListOfVolumes() const
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
const char * GetString() const
virtual void Show()
Hide the transient frame.
virtual void Hide()
Hide the transient frame.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void DeleteWindow()
Delete window.
Int_t GetNumberOfTabs() const
Return number of tabs.
virtual void BuildListTree()=0
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
virtual void CloseWindow()
When closed via WM close button, just unmap (i.e.
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
TGeoVolume * GetVolume() const
int main(int argc, char **argv)
void SetModelClass(TClass *mcl)
void SetSelected(TGListTreeItem *item)
virtual const char * GetTitle() const
Returns title of object.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
virtual void SetEnabled(Int_t tabIndex, Bool_t on=kTRUE)
Enable or disable tab.
const char * Data() const
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.