// @(#):$Id$
// Author: M.Gheata 

/*************************************************************************
 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//______________________________________________________________________________
//  TGeoTabManager  - manager for all editor tabs.                                                    //
//                                                                      
//  TGeoTreeDialog  - Base class for dialog frames for selecting objects 
// with a tree hierarchy. Specific implementations are:
//     TGeoVolumeDialog -  Special tree dialog class for selecting volumes.
//     TGeoShapeDialog  -  Special tree dialog class for selecting shapes. 
//     TGeoMediumDialog -  Special tree dialog class for selecting media.
//     TGeoMaterialDialog - Special tree dialog class for selecting materials.
//     TGeoMatrixDialog -  Special tree dialog class for selecting matrices.                   
//  TGeoTransientPanel - Special transient tab holding TGeo editors.
//______________________________________________________________________________

#include "TROOT.h"
#include "TClass.h"
#include "TVirtualPad.h"
#include "TGeoGedFrame.h"
#include "TGTab.h"
#include "TGLabel.h"
#include "TGComboBox.h"
#include "TGListBox.h"
#include "TGListTree.h"
#include "TGTextEntry.h"
#include "TGCanvas.h"
#include "TGMimeTypes.h"

#include "TGeoManager.h"
#include "TGeoShape.h"
#include "TGeoVolume.h"
#include "TGeoMedium.h"
#include "TGeoMaterial.h"
#include "TGeoMatrix.h"

#include "TGedEditor.h"
#include "TGeoTabManager.h"

TMap TGeoTabManager::fgEditorToMgrMap;

ClassImp(TGeoTabManager)

//______________________________________________________________________________
TGeoTabManager::TGeoTabManager(TGedEditor *ged)
{
// Ctor.
   fGedEditor = ged;
   fPad = ged->GetPad();
   fTab = ged->GetTab();
   fVolume = 0;
   fShapePanel = 0;
   fMediumPanel = 0;
   fMaterialPanel = 0;
   fMatrixPanel = 0;
   fVolumeTab = 0;
   fgEditorToMgrMap.Add(ged, this);
}   

//______________________________________________________________________________
TGeoTabManager::~TGeoTabManager()
{
// Dtor.
   fgEditorToMgrMap.Remove(fGedEditor);
   if (fShapePanel) delete fShapePanel;
   if (fMaterialPanel) delete fMaterialPanel;
   if (fMatrixPanel) delete fMatrixPanel;
   if (fMediumPanel) delete fMediumPanel;
}

//______________________________________________________________________________
void TGeoTabManager::Cleanup(TGCompositeFrame *frame)
{
// Static method to cleanup hirarchically all daughters of a composite frame.
// Does not remove the frame itself.
   TGFrameElement *el;
   TList *list = frame->GetList();
   Int_t nframes = list->GetSize();
   TClass *cl;
   for (Int_t i=0; i<nframes; i++) {
      el = (TGFrameElement *)list->At(i);
      cl = el->fFrame->IsA();
      if (cl==TGCompositeFrame::Class() || cl==TGHorizontalFrame::Class() || cl==TGVerticalFrame::Class())
         Cleanup((TGCompositeFrame*)el->fFrame);
   }
   frame->Cleanup();
}   

//______________________________________________________________________________
void TGeoTabManager::GetShapeEditor(TGeoShape *shape)
{
// Get editor for a shape.
   if (!shape) return;
   if (!fShapePanel) fShapePanel = new TGeoTransientPanel(fGedEditor, "Shape", shape);
   else {
      fShapePanel->SetModel(shape);   
      fShapePanel->Show();
   }   
}

//______________________________________________________________________________
void TGeoTabManager::GetVolumeEditor(TGeoVolume *volume)
{
// Get editor for a volume.
   if (!volume || !fVolumeTab) return;
   GetEditors(TAttLine::Class());
   GetEditors(TGeoVolume::Class());
   fVolumeTab->MapSubwindows();
   fVolumeTab->Layout();
   SetModel(volume);
}
   
//______________________________________________________________________________
void TGeoTabManager::GetMatrixEditor(TGeoMatrix *matrix)
{
// Get editor for a matrix.
   if (!matrix) return;
   if (!fMatrixPanel) fMatrixPanel = new TGeoTransientPanel(fGedEditor, "Matrix", matrix);
   else {
      fMatrixPanel->SetModel(matrix);
      fMatrixPanel->Show();
   }   
}

//______________________________________________________________________________
void TGeoTabManager::GetMediumEditor(TGeoMedium *medium)
{
// Get editor for a medium.
   if (!medium) return;
   if (!fMediumPanel) fMediumPanel = new TGeoTransientPanel(fGedEditor, "Medium", medium);
   else {
      fMediumPanel->SetModel(medium);
      fMediumPanel->Show();
      fMediumPanel->RaiseWindow();
   }   
}

//______________________________________________________________________________
void TGeoTabManager::GetMaterialEditor(TGeoMaterial *material)
{
// Get editor for a material.
   if (!material) return;
   TString name = "Material";
   if (material->IsMixture()) name = "Mixture";
   if (!fMaterialPanel) fMaterialPanel = new TGeoTransientPanel(fGedEditor, name.Data(), material);
   else {
      fMaterialPanel->SetModel(material);
      fMaterialPanel->Show();
      fMaterialPanel->RaiseWindow();
   }   
}

//______________________________________________________________________________
void TGeoTabManager::GetEditors(TClass *cl)
{
// Get editor for a class.
   // Look in fVolumeTab for any object deriving from TGedFrame,

   TClass *class2 = TClass::GetClass(TString::Format("%sEditor",cl->GetName()));
   if (class2 && class2->InheritsFrom(TGedFrame::Class())) {
      TGFrameElement *fr;
      TIter next(fVolumeTab->GetList());
      while ((fr = (TGFrameElement *) next())) if (fr->fFrame->IsA() == class2) return;
      TGClient *client = fGedEditor->GetClient();
      TGWindow *exroot = (TGWindow*) client->GetRoot();
      client->SetRoot(fVolumeTab);
      TGedEditor::SetFrameCreator(fGedEditor);
      TGedFrame* gfr = reinterpret_cast<TGedFrame*>(class2->New());
      gfr->SetModelClass(cl);
      TGedEditor::SetFrameCreator(0);
      client->SetRoot(exroot);
      fVolumeTab->AddFrame(gfr, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2));
      gfr->MapSubwindows();
   }
}

//______________________________________________________________________________
TGeoTabManager *TGeoTabManager::GetMakeTabManager(TGedEditor *ged)
{
// Static method to return the tab manager currently appended to the pad or create one 
// if not existing.
   if (!ged) return NULL;
   TPair *pair = (TPair*) fgEditorToMgrMap.FindObject(ged);
   if (pair) {
      return (TGeoTabManager*) pair->Value();
   } else {
      TGeoTabManager *tabmgr = new TGeoTabManager(ged); // added to fgEditorToMgrMap in ctor
      return tabmgr;
   }
}   

//______________________________________________________________________________
Int_t TGeoTabManager::GetTabIndex() const
{
// Get index for a given tab element.
   Int_t ntabs = fTab->GetNumberOfTabs();
   TString tabname = "Volume";
                     
   TGTabElement *tel;
   for (Int_t i=0; i<ntabs; i++) {
      tel = fTab->GetTabTab(i);
      if (tel && !strcmp(tel->GetString(),tabname.Data())) return i;
   }   
   return 0;
}

//______________________________________________________________________________
void TGeoTabManager::MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
{
// Move frame fr at the end of the list of parent p.
   TList *list = p->GetList();
   TIter next(list);
   TGFrameElement *el = 0;
   while ((el=(TGFrameElement*)next())) {
      if (el->fFrame == fr) break;
   }  
   if (el) { 
      list->Remove(el);
      list->Add(el);
   }   
}

//______________________________________________________________________________
void TGeoTabManager::SetVolTabEnabled(Bool_t flag)
{
// Enable/disable tabs
   fTab->SetEnabled(GetTabIndex(), flag);
}

//______________________________________________________________________________
void TGeoTabManager::SetModel(TObject *model)
{
// Send the SetModel signal to all editors in the tab TYPE.
   TGCompositeFrame *tab = fVolumeTab;
   fVolume = (TGeoVolume*)model;
   TGFrameElement *el;
   TIter next(tab->GetList());
   while ((el = (TGFrameElement *) next())) {
      if ((el->fFrame)->InheritsFrom(TGedFrame::Class())) {
         ((TGedFrame *)(el->fFrame))->SetModel(model);
      }   
   }
}      

//______________________________________________________________________________
void TGeoTabManager::SetTab()
{
// Set a given tab element as active one.
   fTab->SetTab(GetTabIndex());
}
   
ClassImp(TGeoTreeDialog)

TObject *TGeoTreeDialog::fgSelectedObj = 0;

//______________________________________________________________________________
TObject *TGeoTreeDialog::GetSelected() 
{
   //static; return selected object
   return fgSelectedObj;
}

//______________________________________________________________________________
TGeoTreeDialog::TGeoTreeDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
               :TGTransientFrame(main, main, w, h)
{
// Constructor
   fgSelectedObj = 0;
   fCanvas = new TGCanvas(this, 100, 200,  kSunkenFrame | kDoubleBorder);
   fLT = new TGListTree(fCanvas->GetViewPort(), 100, 200);
   fLT->Associate(this);
   fCanvas->SetContainer(fLT);
   AddFrame(fCanvas, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 2,2,2,2));
   f1 = new TGCompositeFrame(this, 100, 10, kHorizontalFrame | kLHintsExpandX);
   fObjLabel = new TGLabel(f1, "Selected: -none-");
   Pixel_t color;
   gClient->GetColorByName("#0000ff", color);
   fObjLabel->SetTextColor(color);
   fObjLabel->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fObjLabel, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 2,2,2,2));
   fClose = new TGTextButton(f1, "&Close");
   fClose->Associate(this);
   f1->AddFrame(fClose, new TGLayoutHints(kLHintsRight, 2,2,2,2)); 
   AddFrame(f1, new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 2,2,2,2));
   
   Int_t ww = caller->GetWidth();
   Window_t wdum;
   Int_t    ax, ay;
   gVirtualX->TranslateCoordinates(caller->GetId(), main->GetId(), 0,0,ax,ay,wdum);
   Move(ax + ww, ay);
   SetWMPosition(ax, ay);
   
}

//______________________________________________________________________________
TGeoTreeDialog::~TGeoTreeDialog()
{
// Destructor
   delete fClose;
   delete fObjLabel;
   delete f1;
   delete fLT;
   delete fCanvas;
}

//______________________________________________________________________________
void TGeoTreeDialog::DoSelect(TGListTreeItem *item)
{
// Update dialog to reflect current clicked object.
   static TString name;
   if (!item || !item->GetUserData()) {
      fgSelectedObj = 0;
      name = "Selected: -none-";
      fObjLabel->SetText(name);
      return;
   }
   fgSelectedObj = (TObject *)item->GetUserData();
   if (fgSelectedObj) {
      name = TString::Format("Selected %s", fgSelectedObj->GetName());
      fObjLabel->SetText(name);
   }   
}   
      
ClassImp(TGeoVolumeDialog)

//______________________________________________________________________________
TGeoVolumeDialog::TGeoVolumeDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
                 :TGeoTreeDialog(caller, main, w, h)
{
// Ctor.
   BuildListTree();   
   ConnectSignalsToSlots();
   MapSubwindows();
   Layout();
   SetWindowName("Volume dialog");
   MapWindow();
   gClient->WaitForUnmap(this);
}

//______________________________________________________________________________
void TGeoVolumeDialog::BuildListTree()
{
// Build volume specific list tree.
   const TGPicture *pic_fld = gClient->GetPicture("folder_t.xpm");
   const TGPicture *pic_fldo = gClient->GetPicture("ofolder_t.xpm");
   const TGPicture *pic_file = gClient->GetPicture("mdi_default.xpm");
   const TGPicture *pic_fileo = gClient->GetPicture("fileopen.xpm");
   TGListTreeItem *parent_item=0;
   TGeoVolume *parent_vol = gGeoManager->GetMasterVolume();
   TGeoVolume *vol;
   // Existing volume hierarchy
   parent_item = fLT->AddItem(parent_item, "Volume hierarchy", pic_fldo, pic_fld);
   parent_item->SetTipText("Select a volume from the existing hierarchy");
   fLT->OpenItem(parent_item);
   if (parent_vol) {
      if (!parent_vol->GetNdaughters()) {
         parent_item = fLT->AddItem(parent_item, parent_vol->GetName(), parent_vol, pic_fileo, pic_file);
         parent_item->SetTipText("Master volume");
         fLT->SetSelected(parent_item);
      } else {
         parent_item = fLT->AddItem(parent_item, parent_vol->GetName(), parent_vol, pic_fldo, pic_fld);
         parent_item->SetTipText("Master volume");
         fLT->SetSelected(parent_item);
      }
   }
   parent_item = fLT->AddItem(NULL, "Other volumes", pic_fldo, pic_fld);
   parent_item->SetTipText("Select a volume from the list of unconnected volumes");
   TIter next1(gGeoManager->GetListOfVolumes());
   Bool_t found = kFALSE;
   while ((vol=(TGeoVolume*)next1())) {
      if (vol->IsAdded()) continue;
      fLT->AddItem(parent_item, vol->GetName(), vol, pic_fileo, pic_file);
      found = kTRUE;
   }
   if (found) {    
//      fLT->OpenItem(parent_item);   
      if (!parent_vol) fLT->SetSelected(parent_item->GetFirstChild());
   }        
}

//______________________________________________________________________________
void TGeoVolumeDialog::DoClose()
{
// Handle close button.
   DeleteWindow();
}   

//______________________________________________________________________________
void TGeoVolumeDialog::DoItemClick(TGListTreeItem *item, Int_t btn)
{
// Handle item click.
   // Iterate daughters
   if (btn!=kButton1) return;
   DoSelect(item);   
   if (!item || !item->GetUserData()) return;
   const TGPicture *pic_fld = gClient->GetPicture("folder_t.xpm");
   const TGPicture *pic_fldo = gClient->GetPicture("ofolder_t.xpm");
   const TGPicture *pic_file = gClient->GetPicture("mdi_default.xpm");
   const TGPicture *pic_fileo = gClient->GetPicture("fileopen.xpm");
   TGeoVolume *parent_vol = (TGeoVolume*)item->GetUserData();
   TGeoVolume *vol;
   TGeoNode *crtnode;
   TGListTreeItem *daughter_item;
   Int_t i,j,ind,icopy;
   Int_t nd = parent_vol->GetNdaughters();
   for (i=0; i<nd; i++) {
      icopy = 0;
      crtnode = parent_vol->GetNode(i);
      vol = crtnode->GetVolume();
      // check if the volume is replicated in the parent
      ind = parent_vol->GetIndex(crtnode);
      for (j=0; j<ind; j++) if (parent_vol->GetNode(j)->GetVolume() == vol) break;
      if (i<ind) continue;
      icopy++;
      for (j=ind+1; j<nd; j++) if (parent_vol->GetNode(j)->GetVolume() == vol) icopy++;
      daughter_item = fLT->AddItem(item, ((icopy>1)?(TString::Format("%s (%i)",vol->GetName(),icopy)).Data():vol->GetName()), 
                    vol,((vol->GetNdaughters())?pic_fldo:pic_fileo), ((vol->GetNdaughters())?pic_fld:pic_file));
      if (strlen(vol->GetTitle())) daughter_item->SetTipText(vol->GetTitle());            
   }
   if (nd) gClient->NeedRedraw(fLT);
}   

//______________________________________________________________________________
void TGeoVolumeDialog::ConnectSignalsToSlots()
{
// Connect signals to slots.
   fClose->Connect("Clicked()", "TGeoVolumeDialog", this, "DoClose()");
   fLT->Connect("Clicked(TGListTreeItem *, Int_t)", "TGeoVolumeDialog", this, 
                "DoItemClick(TGListTreeItem *, Int_t)");
}

ClassImp(TGeoShapeDialog)

//______________________________________________________________________________
TGeoShapeDialog::TGeoShapeDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
                 :TGeoTreeDialog(caller, main, w, h)
{
// Ctor.
   BuildListTree();   
   ConnectSignalsToSlots();
   MapSubwindows();
   Layout();
   SetWindowName("Shape dialog");
   MapWindow();
   gClient->WaitForUnmap(this);
}

//______________________________________________________________________________
void TGeoShapeDialog::BuildListTree()
{
// Build shape specific list tree.
   const TGPicture *pic_fld = gClient->GetPicture("folder_t.xpm");
   const TGPicture *pic_fldo = gClient->GetPicture("ofolder_t.xpm");
   const TGPicture *pic_shape;
   TGListTreeItem *parent_item=0;
   TGeoShape *shape;
   const char *shapename;
   TString fld_name;
   Int_t nshapes = gGeoManager->GetListOfShapes()->GetEntriesFast();
   if (!nshapes) return;
   // Existing shapes
   for (Int_t i=0; i<nshapes; i++) {
      shape = (TGeoShape*)gGeoManager->GetListOfShapes()->At(i);
      if (!shape) continue;
      shapename = shape->IsA()->GetName();
      pic_shape = fClient->GetMimeTypeList()->GetIcon(shapename, kTRUE);
      fld_name = shapename;  // e.g. "TGeoBBox"
      fld_name.Remove(0,4); // remove "TGeo" part -> "BBox"
      fld_name += " Shapes";
      parent_item = fLT->FindChildByName(NULL, fld_name.Data());
      if (!parent_item) {
         parent_item = fLT->AddItem(NULL, fld_name.Data(), pic_fldo, pic_fld);
         parent_item->SetTipText(TString::Format("List of %s shapes",fld_name.Data()));
      }
      fLT->AddItem(parent_item, shape->GetName(), shape, pic_shape, pic_shape);
   }   
}

//______________________________________________________________________________
void TGeoShapeDialog::DoClose()
{
// Handle close button.
   DeleteWindow();
}   

//______________________________________________________________________________
void TGeoShapeDialog::DoItemClick(TGListTreeItem *item, Int_t btn)
{
// Handle item click.
   // Iterate daughters
   if (btn!=kButton1) return;
   DoSelect(item);   
   if (!item || !item->GetUserData()) return;
}   

//______________________________________________________________________________
void TGeoShapeDialog::ConnectSignalsToSlots()
{
// Connect signals to slots.
   fClose->Connect("Clicked()", "TGeoShapeDialog", this, "DoClose()");
   fLT->Connect("Clicked(TGListTreeItem *, Int_t)", "TGeoShapeDialog", this, 
                "DoItemClick(TGListTreeItem *, Int_t)");
}

ClassImp(TGeoMediumDialog)

//______________________________________________________________________________
TGeoMediumDialog::TGeoMediumDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
                 :TGeoTreeDialog(caller, main, w, h)
{
// Ctor.
   BuildListTree();   
   ConnectSignalsToSlots();
   MapSubwindows();
   Layout();
   SetWindowName("Medium dialog");
   MapWindow();
   gClient->WaitForUnmap(this);
}

//______________________________________________________________________________
void TGeoMediumDialog::BuildListTree()
{
// Build volume specific list tree.
   const TGPicture *pic_med = gClient->GetPicture("geomedium_t.xpm");;
   TGeoMedium *med;
   Int_t nmed = gGeoManager->GetListOfMedia()->GetSize();
   if (!nmed) return;
   // Existing media
   for (Int_t i=0; i<nmed; i++) {
      med = (TGeoMedium*)gGeoManager->GetListOfMedia()->At(i);
      fLT->AddItem(NULL, med->GetName(), med, pic_med, pic_med);
   }   
}

//______________________________________________________________________________
void TGeoMediumDialog::DoClose()
{
// Handle close button.
   DeleteWindow();
}   

//______________________________________________________________________________
void TGeoMediumDialog::DoItemClick(TGListTreeItem *item, Int_t btn)
{
// Handle item click.
   // Iterate daughters
   if (btn!=kButton1) return;
   DoSelect(item);   
   if (!item || !item->GetUserData()) return;
   //gClient->NeedRedraw(fLT);
}   

//______________________________________________________________________________
void TGeoMediumDialog::ConnectSignalsToSlots()
{
// Connect signals to slots.
   fClose->Connect("Clicked()", "TGeoMediumDialog", this, "DoClose()");
   fLT->Connect("Clicked(TGListTreeItem *, Int_t)", "TGeoMediumDialog", this, 
                "DoItemClick(TGListTreeItem *, Int_t)");
}

ClassImp(TGeoMaterialDialog)

//______________________________________________________________________________
TGeoMaterialDialog::TGeoMaterialDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
                 :TGeoTreeDialog(caller, main, w, h)
{
// Ctor.
   BuildListTree();   
   ConnectSignalsToSlots();
   MapSubwindows();
   Layout();
   SetWindowName("Material dialog");
   MapWindow();
   gClient->WaitForUnmap(this);
}

//______________________________________________________________________________
void TGeoMaterialDialog::BuildListTree()
{
// Build volume specific list tree.
   const TGPicture *pic_mat = gClient->GetPicture("geomaterial_t.xpm");;
   TGeoMaterial *mat;
   Int_t nmat = gGeoManager->GetListOfMaterials()->GetSize();
   if (!nmat) return;
   // Existing materials
   for (Int_t i=0; i<nmat; i++) {
      mat = (TGeoMaterial*)gGeoManager->GetListOfMaterials()->At(i);
      fLT->AddItem(NULL, mat->GetName(), mat, pic_mat, pic_mat);
   }   
}

//______________________________________________________________________________
void TGeoMaterialDialog::DoClose()
{
// Handle close button.
   DeleteWindow();
}   

//______________________________________________________________________________
void TGeoMaterialDialog::DoItemClick(TGListTreeItem *item, Int_t btn)
{
// Handle item click.
   // Iterate daughters
   if (btn!=kButton1) return;
   DoSelect(item);   
   if (!item || !item->GetUserData()) return;
   //gClient->NeedRedraw(fLT);
}   

//______________________________________________________________________________
void TGeoMaterialDialog::ConnectSignalsToSlots()
{
// Connect signals to slots.
   fClose->Connect("Clicked()", "TGeoMaterialDialog", this, "DoClose()");
   fLT->Connect("Clicked(TGListTreeItem *, Int_t)", "TGeoMaterialDialog", this, 
                "DoItemClick(TGListTreeItem *, Int_t)");
}

ClassImp(TGeoMatrixDialog)

//______________________________________________________________________________
TGeoMatrixDialog::TGeoMatrixDialog(TGFrame *caller, const TGWindow *main, UInt_t w, UInt_t h)
                 :TGeoTreeDialog(caller, main, w, h)
{
// Ctor.
   BuildListTree();   
   ConnectSignalsToSlots();
   MapSubwindows();
   Layout();
   SetWindowName("Matrix dialog");
   MapWindow();
   gClient->WaitForUnmap(this);
}

//______________________________________________________________________________
void TGeoMatrixDialog::BuildListTree()
{
// Build matrix specific list tree.
   const TGPicture *pic_tr = gClient->GetPicture("geotranslation_t.xpm");
   const TGPicture *pic_rot = gClient->GetPicture("georotation_t.xpm");
   const TGPicture *pic_combi = gClient->GetPicture("geocombi_t.xpm");
   const TGPicture *pic;
   TGListTreeItem *parent_item=0;
   TGeoMatrix *matrix;
   Int_t nmat = gGeoManager->GetListOfMatrices()->GetEntriesFast();
   if (!nmat) return;
   // Existing matrices
   for (Int_t i=0; i<nmat; i++) {
      matrix = (TGeoMatrix*)gGeoManager->GetListOfMatrices()->At(i);
      if (matrix->IsIdentity()) continue;
      if (!strcmp(matrix->IsA()->GetName(),"TGeoTranslation")) {
         pic = pic_tr;
         parent_item = fLT->FindChildByName(NULL, "Translations");
         if (!parent_item) {
            parent_item = fLT->AddItem(NULL, "Translations", pic, pic);
            parent_item->SetTipText("List of translations");
         }            
      } else if (!strcmp(matrix->IsA()->GetName(),"TGeoRotation")) {
         pic = pic_rot;
         parent_item = fLT->FindChildByName(NULL, "Rotations");
         if (!parent_item) {
            parent_item = fLT->AddItem(NULL, "Rotations", pic, pic);
            parent_item->SetTipText("List of rotations");
         } 
      } else if (!strcmp(matrix->IsA()->GetName(),"TGeoCombiTrans") ||
                  !strcmp(matrix->IsA()->GetName(),"TGeoHMatrix")) {
         pic = pic_combi;
         parent_item = fLT->FindChildByName(NULL, "Combined");
         if (!parent_item) {
            parent_item = fLT->AddItem(NULL, "Combined", pic, pic);
            parent_item->SetTipText("List of combined transformations");
         } 
      } else continue;
      fLT->AddItem(parent_item, matrix->GetName(), matrix, pic, pic);
   }   
}

//______________________________________________________________________________
void TGeoMatrixDialog::DoClose()
{
// Handle close button.
   DeleteWindow();
}   

//______________________________________________________________________________
void TGeoMatrixDialog::DoItemClick(TGListTreeItem *item, Int_t btn)
{
// Handle item click.
   // Iterate daughters
   if (btn!=kButton1) return;
   DoSelect(item);   
   if (!item || !item->GetUserData()) return;
   //gClient->NeedRedraw(fLT);
}   

//______________________________________________________________________________
void TGeoMatrixDialog::ConnectSignalsToSlots()
{
// Connect signals to slots.
   fClose->Connect("Clicked()", "TGeoMatrixDialog", this, "DoClose()");
   fLT->Connect("Clicked(TGListTreeItem *, Int_t)", "TGeoMatrixDialog", this, 
                "DoItemClick(TGListTreeItem *, Int_t)");
}

ClassImp(TGeoTransientPanel)

//______________________________________________________________________________
TGeoTransientPanel::TGeoTransientPanel(TGedEditor* ged, const char *name, TObject *obj)
                   :TGMainFrame(gClient->GetRoot(),175,20)
{
// Transient panel ctor.
   fGedEditor = ged;
   fModel = obj;
   fCan = new TGCanvas(this, 170, 100);
   fTab = new TGTab(fCan->GetViewPort(), 10, 10);
   fCan->SetContainer(fTab);
   AddFrame(fCan, new TGLayoutHints(kLHintsExpandY | kLHintsExpandX));
   fTab->Associate(fCan);
   fTabContainer = fTab->AddTab(name);
   fStyle = new TGCompositeFrame(fTabContainer, 110, 30, kVerticalFrame);
   fTabContainer->AddFrame(fStyle, new TGLayoutHints(kLHintsTop | kLHintsExpandX,\
                                                     5, 0, 2, 2));
   TString wname = name;
   wname += " Editor";
   SetWindowName(wname.Data());
   SetModel(fModel);
   fClose = new TGTextButton(this, "Close");
   AddFrame(fClose, new TGLayoutHints(kLHintsBottom | kLHintsRight, 0,10,5,5));
   MapSubwindows();
   Layout();
   Resize(fTabContainer->GetDefaultWidth()+30, fTabContainer->GetDefaultHeight()+65);
   MapWindow();
   gROOT->GetListOfCleanups()->Add(this);
   fClose->Connect("Clicked()", "TGeoTransientPanel", this, "Hide()");
} 

//______________________________________________________________________________
TGeoTransientPanel::~TGeoTransientPanel()
{
// Destructor.
   DeleteEditors();
   delete fTab;
   delete fCan;
   gROOT->GetListOfCleanups()->Remove(this);
}

//______________________________________________________________________________
void TGeoTransientPanel::CloseWindow()
{
   // When closed via WM close button, just unmap (i.e. hide) editor
   // for later use.
   UnmapWindow();
   gROOT->GetListOfCleanups()->Remove(this);
}

//______________________________________________________________________________
void TGeoTransientPanel::GetEditors(TClass *cl)
{
// Get editor for a class.
   // Look in fStyle for any object deriving from TGedFrame,

   TClass *class2 = TClass::GetClass(TString::Format("%sEditor",cl->GetName()));
   if (class2 && class2->InheritsFrom(TGedFrame::Class())) {
      TGFrameElement *fr;
      TIter next(fStyle->GetList());
      while ((fr = (TGFrameElement *) next()))
         if (fr->fFrame->IsA() == class2) return;
      TGClient *client = fGedEditor->GetClient();
      TGWindow *exroot = (TGWindow*) client->GetRoot();
      client->SetRoot(fStyle);
      TGedEditor::SetFrameCreator(fGedEditor);
      TGedFrame* gfr = reinterpret_cast<TGedFrame*>(class2->New());
      gfr->SetModelClass(cl);
      TGedEditor::SetFrameCreator(0);
      client->SetRoot(exroot);
      fStyle->AddFrame(gfr, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2));
      gfr->MapSubwindows();
   }
}

//______________________________________________________________________________
void TGeoTransientPanel::SetModel(TObject *model)
{
// Update the editors in the main tab to reflect the selected object.
   if (!model) return;
   fModel = model;
   GetEditors(model->IsA());
   TGFrameElement *el;
   TIter next(fStyle->GetList());
   while ((el = (TGFrameElement *) next())) {
      if ((el->fFrame)->InheritsFrom(TGedFrame::Class())) {
         ((TGedFrame *)(el->fFrame))->SetModel(model);
      }   
   }
   Resize(fTabContainer->GetDefaultWidth()+30, fTabContainer->GetDefaultHeight()+65);
}

//______________________________________________________________________________
void TGeoTransientPanel::Hide()
{
// Hide the transient frame
   UnmapWindow();
}

//______________________________________________________________________________
void TGeoTransientPanel::Show()
{
// Hide the transient frame
   MapWindow();
}

//______________________________________________________________________________
void TGeoTransientPanel::DeleteEditors()
{
// Delete editors.
   fStyle->Cleanup();
}

   
 TGeoTabManager.cxx:1
 TGeoTabManager.cxx:2
 TGeoTabManager.cxx:3
 TGeoTabManager.cxx:4
 TGeoTabManager.cxx:5
 TGeoTabManager.cxx:6
 TGeoTabManager.cxx:7
 TGeoTabManager.cxx:8
 TGeoTabManager.cxx:9
 TGeoTabManager.cxx:10
 TGeoTabManager.cxx:11
 TGeoTabManager.cxx:12
 TGeoTabManager.cxx:13
 TGeoTabManager.cxx:14
 TGeoTabManager.cxx:15
 TGeoTabManager.cxx:16
 TGeoTabManager.cxx:17
 TGeoTabManager.cxx:18
 TGeoTabManager.cxx:19
 TGeoTabManager.cxx:20
 TGeoTabManager.cxx:21
 TGeoTabManager.cxx:22
 TGeoTabManager.cxx:23
 TGeoTabManager.cxx:24
 TGeoTabManager.cxx:25
 TGeoTabManager.cxx:26
 TGeoTabManager.cxx:27
 TGeoTabManager.cxx:28
 TGeoTabManager.cxx:29
 TGeoTabManager.cxx:30
 TGeoTabManager.cxx:31
 TGeoTabManager.cxx:32
 TGeoTabManager.cxx:33
 TGeoTabManager.cxx:34
 TGeoTabManager.cxx:35
 TGeoTabManager.cxx:36
 TGeoTabManager.cxx:37
 TGeoTabManager.cxx:38
 TGeoTabManager.cxx:39
 TGeoTabManager.cxx:40
 TGeoTabManager.cxx:41
 TGeoTabManager.cxx:42
 TGeoTabManager.cxx:43
 TGeoTabManager.cxx:44
 TGeoTabManager.cxx:45
 TGeoTabManager.cxx:46
 TGeoTabManager.cxx:47
 TGeoTabManager.cxx:48
 TGeoTabManager.cxx:49
 TGeoTabManager.cxx:50
 TGeoTabManager.cxx:51
 TGeoTabManager.cxx:52
 TGeoTabManager.cxx:53
 TGeoTabManager.cxx:54
 TGeoTabManager.cxx:55
 TGeoTabManager.cxx:56
 TGeoTabManager.cxx:57
 TGeoTabManager.cxx:58
 TGeoTabManager.cxx:59
 TGeoTabManager.cxx:60
 TGeoTabManager.cxx:61
 TGeoTabManager.cxx:62
 TGeoTabManager.cxx:63
 TGeoTabManager.cxx:64
 TGeoTabManager.cxx:65
 TGeoTabManager.cxx:66
 TGeoTabManager.cxx:67
 TGeoTabManager.cxx:68
 TGeoTabManager.cxx:69
 TGeoTabManager.cxx:70
 TGeoTabManager.cxx:71
 TGeoTabManager.cxx:72
 TGeoTabManager.cxx:73
 TGeoTabManager.cxx:74
 TGeoTabManager.cxx:75
 TGeoTabManager.cxx:76
 TGeoTabManager.cxx:77
 TGeoTabManager.cxx:78
 TGeoTabManager.cxx:79
 TGeoTabManager.cxx:80
 TGeoTabManager.cxx:81
 TGeoTabManager.cxx:82
 TGeoTabManager.cxx:83
 TGeoTabManager.cxx:84
 TGeoTabManager.cxx:85
 TGeoTabManager.cxx:86
 TGeoTabManager.cxx:87
 TGeoTabManager.cxx:88
 TGeoTabManager.cxx:89
 TGeoTabManager.cxx:90
 TGeoTabManager.cxx:91
 TGeoTabManager.cxx:92
 TGeoTabManager.cxx:93
 TGeoTabManager.cxx:94
 TGeoTabManager.cxx:95
 TGeoTabManager.cxx:96
 TGeoTabManager.cxx:97
 TGeoTabManager.cxx:98
 TGeoTabManager.cxx:99
 TGeoTabManager.cxx:100
 TGeoTabManager.cxx:101
 TGeoTabManager.cxx:102
 TGeoTabManager.cxx:103
 TGeoTabManager.cxx:104
 TGeoTabManager.cxx:105
 TGeoTabManager.cxx:106
 TGeoTabManager.cxx:107
 TGeoTabManager.cxx:108
 TGeoTabManager.cxx:109
 TGeoTabManager.cxx:110
 TGeoTabManager.cxx:111
 TGeoTabManager.cxx:112
 TGeoTabManager.cxx:113
 TGeoTabManager.cxx:114
 TGeoTabManager.cxx:115
 TGeoTabManager.cxx:116
 TGeoTabManager.cxx:117
 TGeoTabManager.cxx:118
 TGeoTabManager.cxx:119
 TGeoTabManager.cxx:120
 TGeoTabManager.cxx:121
 TGeoTabManager.cxx:122
 TGeoTabManager.cxx:123
 TGeoTabManager.cxx:124
 TGeoTabManager.cxx:125
 TGeoTabManager.cxx:126
 TGeoTabManager.cxx:127
 TGeoTabManager.cxx:128
 TGeoTabManager.cxx:129
 TGeoTabManager.cxx:130
 TGeoTabManager.cxx:131
 TGeoTabManager.cxx:132
 TGeoTabManager.cxx:133
 TGeoTabManager.cxx:134
 TGeoTabManager.cxx:135
 TGeoTabManager.cxx:136
 TGeoTabManager.cxx:137
 TGeoTabManager.cxx:138
 TGeoTabManager.cxx:139
 TGeoTabManager.cxx:140
 TGeoTabManager.cxx:141
 TGeoTabManager.cxx:142
 TGeoTabManager.cxx:143
 TGeoTabManager.cxx:144
 TGeoTabManager.cxx:145
 TGeoTabManager.cxx:146
 TGeoTabManager.cxx:147
 TGeoTabManager.cxx:148
 TGeoTabManager.cxx:149
 TGeoTabManager.cxx:150
 TGeoTabManager.cxx:151
 TGeoTabManager.cxx:152
 TGeoTabManager.cxx:153
 TGeoTabManager.cxx:154
 TGeoTabManager.cxx:155
 TGeoTabManager.cxx:156
 TGeoTabManager.cxx:157
 TGeoTabManager.cxx:158
 TGeoTabManager.cxx:159
 TGeoTabManager.cxx:160
 TGeoTabManager.cxx:161
 TGeoTabManager.cxx:162
 TGeoTabManager.cxx:163
 TGeoTabManager.cxx:164
 TGeoTabManager.cxx:165
 TGeoTabManager.cxx:166
 TGeoTabManager.cxx:167
 TGeoTabManager.cxx:168
 TGeoTabManager.cxx:169
 TGeoTabManager.cxx:170
 TGeoTabManager.cxx:171
 TGeoTabManager.cxx:172
 TGeoTabManager.cxx:173
 TGeoTabManager.cxx:174
 TGeoTabManager.cxx:175
 TGeoTabManager.cxx:176
 TGeoTabManager.cxx:177
 TGeoTabManager.cxx:178
 TGeoTabManager.cxx:179
 TGeoTabManager.cxx:180
 TGeoTabManager.cxx:181
 TGeoTabManager.cxx:182
 TGeoTabManager.cxx:183
 TGeoTabManager.cxx:184
 TGeoTabManager.cxx:185
 TGeoTabManager.cxx:186
 TGeoTabManager.cxx:187
 TGeoTabManager.cxx:188
 TGeoTabManager.cxx:189
 TGeoTabManager.cxx:190
 TGeoTabManager.cxx:191
 TGeoTabManager.cxx:192
 TGeoTabManager.cxx:193
 TGeoTabManager.cxx:194
 TGeoTabManager.cxx:195
 TGeoTabManager.cxx:196
 TGeoTabManager.cxx:197
 TGeoTabManager.cxx:198
 TGeoTabManager.cxx:199
 TGeoTabManager.cxx:200
 TGeoTabManager.cxx:201
 TGeoTabManager.cxx:202
 TGeoTabManager.cxx:203
 TGeoTabManager.cxx:204
 TGeoTabManager.cxx:205
 TGeoTabManager.cxx:206
 TGeoTabManager.cxx:207
 TGeoTabManager.cxx:208
 TGeoTabManager.cxx:209
 TGeoTabManager.cxx:210
 TGeoTabManager.cxx:211
 TGeoTabManager.cxx:212
 TGeoTabManager.cxx:213
 TGeoTabManager.cxx:214
 TGeoTabManager.cxx:215
 TGeoTabManager.cxx:216
 TGeoTabManager.cxx:217
 TGeoTabManager.cxx:218
 TGeoTabManager.cxx:219
 TGeoTabManager.cxx:220
 TGeoTabManager.cxx:221
 TGeoTabManager.cxx:222
 TGeoTabManager.cxx:223
 TGeoTabManager.cxx:224
 TGeoTabManager.cxx:225
 TGeoTabManager.cxx:226
 TGeoTabManager.cxx:227
 TGeoTabManager.cxx:228
 TGeoTabManager.cxx:229
 TGeoTabManager.cxx:230
 TGeoTabManager.cxx:231
 TGeoTabManager.cxx:232
 TGeoTabManager.cxx:233
 TGeoTabManager.cxx:234
 TGeoTabManager.cxx:235
 TGeoTabManager.cxx:236
 TGeoTabManager.cxx:237
 TGeoTabManager.cxx:238
 TGeoTabManager.cxx:239
 TGeoTabManager.cxx:240
 TGeoTabManager.cxx:241
 TGeoTabManager.cxx:242
 TGeoTabManager.cxx:243
 TGeoTabManager.cxx:244
 TGeoTabManager.cxx:245
 TGeoTabManager.cxx:246
 TGeoTabManager.cxx:247
 TGeoTabManager.cxx:248
 TGeoTabManager.cxx:249
 TGeoTabManager.cxx:250
 TGeoTabManager.cxx:251
 TGeoTabManager.cxx:252
 TGeoTabManager.cxx:253
 TGeoTabManager.cxx:254
 TGeoTabManager.cxx:255
 TGeoTabManager.cxx:256
 TGeoTabManager.cxx:257
 TGeoTabManager.cxx:258
 TGeoTabManager.cxx:259
 TGeoTabManager.cxx:260
 TGeoTabManager.cxx:261
 TGeoTabManager.cxx:262
 TGeoTabManager.cxx:263
 TGeoTabManager.cxx:264
 TGeoTabManager.cxx:265
 TGeoTabManager.cxx:266
 TGeoTabManager.cxx:267
 TGeoTabManager.cxx:268
 TGeoTabManager.cxx:269
 TGeoTabManager.cxx:270
 TGeoTabManager.cxx:271
 TGeoTabManager.cxx:272
 TGeoTabManager.cxx:273
 TGeoTabManager.cxx:274
 TGeoTabManager.cxx:275
 TGeoTabManager.cxx:276
 TGeoTabManager.cxx:277
 TGeoTabManager.cxx:278
 TGeoTabManager.cxx:279
 TGeoTabManager.cxx:280
 TGeoTabManager.cxx:281
 TGeoTabManager.cxx:282
 TGeoTabManager.cxx:283
 TGeoTabManager.cxx:284
 TGeoTabManager.cxx:285
 TGeoTabManager.cxx:286
 TGeoTabManager.cxx:287
 TGeoTabManager.cxx:288
 TGeoTabManager.cxx:289
 TGeoTabManager.cxx:290
 TGeoTabManager.cxx:291
 TGeoTabManager.cxx:292
 TGeoTabManager.cxx:293
 TGeoTabManager.cxx:294
 TGeoTabManager.cxx:295
 TGeoTabManager.cxx:296
 TGeoTabManager.cxx:297
 TGeoTabManager.cxx:298
 TGeoTabManager.cxx:299
 TGeoTabManager.cxx:300
 TGeoTabManager.cxx:301
 TGeoTabManager.cxx:302
 TGeoTabManager.cxx:303
 TGeoTabManager.cxx:304
 TGeoTabManager.cxx:305
 TGeoTabManager.cxx:306
 TGeoTabManager.cxx:307
 TGeoTabManager.cxx:308
 TGeoTabManager.cxx:309
 TGeoTabManager.cxx:310
 TGeoTabManager.cxx:311
 TGeoTabManager.cxx:312
 TGeoTabManager.cxx:313
 TGeoTabManager.cxx:314
 TGeoTabManager.cxx:315
 TGeoTabManager.cxx:316
 TGeoTabManager.cxx:317
 TGeoTabManager.cxx:318
 TGeoTabManager.cxx:319
 TGeoTabManager.cxx:320
 TGeoTabManager.cxx:321
 TGeoTabManager.cxx:322
 TGeoTabManager.cxx:323
 TGeoTabManager.cxx:324
 TGeoTabManager.cxx:325
 TGeoTabManager.cxx:326
 TGeoTabManager.cxx:327
 TGeoTabManager.cxx:328
 TGeoTabManager.cxx:329
 TGeoTabManager.cxx:330
 TGeoTabManager.cxx:331
 TGeoTabManager.cxx:332
 TGeoTabManager.cxx:333
 TGeoTabManager.cxx:334
 TGeoTabManager.cxx:335
 TGeoTabManager.cxx:336
 TGeoTabManager.cxx:337
 TGeoTabManager.cxx:338
 TGeoTabManager.cxx:339
 TGeoTabManager.cxx:340
 TGeoTabManager.cxx:341
 TGeoTabManager.cxx:342
 TGeoTabManager.cxx:343
 TGeoTabManager.cxx:344
 TGeoTabManager.cxx:345
 TGeoTabManager.cxx:346
 TGeoTabManager.cxx:347
 TGeoTabManager.cxx:348
 TGeoTabManager.cxx:349
 TGeoTabManager.cxx:350
 TGeoTabManager.cxx:351
 TGeoTabManager.cxx:352
 TGeoTabManager.cxx:353
 TGeoTabManager.cxx:354
 TGeoTabManager.cxx:355
 TGeoTabManager.cxx:356
 TGeoTabManager.cxx:357
 TGeoTabManager.cxx:358
 TGeoTabManager.cxx:359
 TGeoTabManager.cxx:360
 TGeoTabManager.cxx:361
 TGeoTabManager.cxx:362
 TGeoTabManager.cxx:363
 TGeoTabManager.cxx:364
 TGeoTabManager.cxx:365
 TGeoTabManager.cxx:366
 TGeoTabManager.cxx:367
 TGeoTabManager.cxx:368
 TGeoTabManager.cxx:369
 TGeoTabManager.cxx:370
 TGeoTabManager.cxx:371
 TGeoTabManager.cxx:372
 TGeoTabManager.cxx:373
 TGeoTabManager.cxx:374
 TGeoTabManager.cxx:375
 TGeoTabManager.cxx:376
 TGeoTabManager.cxx:377
 TGeoTabManager.cxx:378
 TGeoTabManager.cxx:379
 TGeoTabManager.cxx:380
 TGeoTabManager.cxx:381
 TGeoTabManager.cxx:382
 TGeoTabManager.cxx:383
 TGeoTabManager.cxx:384
 TGeoTabManager.cxx:385
 TGeoTabManager.cxx:386
 TGeoTabManager.cxx:387
 TGeoTabManager.cxx:388
 TGeoTabManager.cxx:389
 TGeoTabManager.cxx:390
 TGeoTabManager.cxx:391
 TGeoTabManager.cxx:392
 TGeoTabManager.cxx:393
 TGeoTabManager.cxx:394
 TGeoTabManager.cxx:395
 TGeoTabManager.cxx:396
 TGeoTabManager.cxx:397
 TGeoTabManager.cxx:398
 TGeoTabManager.cxx:399
 TGeoTabManager.cxx:400
 TGeoTabManager.cxx:401
 TGeoTabManager.cxx:402
 TGeoTabManager.cxx:403
 TGeoTabManager.cxx:404
 TGeoTabManager.cxx:405
 TGeoTabManager.cxx:406
 TGeoTabManager.cxx:407
 TGeoTabManager.cxx:408
 TGeoTabManager.cxx:409
 TGeoTabManager.cxx:410
 TGeoTabManager.cxx:411
 TGeoTabManager.cxx:412
 TGeoTabManager.cxx:413
 TGeoTabManager.cxx:414
 TGeoTabManager.cxx:415
 TGeoTabManager.cxx:416
 TGeoTabManager.cxx:417
 TGeoTabManager.cxx:418
 TGeoTabManager.cxx:419
 TGeoTabManager.cxx:420
 TGeoTabManager.cxx:421
 TGeoTabManager.cxx:422
 TGeoTabManager.cxx:423
 TGeoTabManager.cxx:424
 TGeoTabManager.cxx:425
 TGeoTabManager.cxx:426
 TGeoTabManager.cxx:427
 TGeoTabManager.cxx:428
 TGeoTabManager.cxx:429
 TGeoTabManager.cxx:430
 TGeoTabManager.cxx:431
 TGeoTabManager.cxx:432
 TGeoTabManager.cxx:433
 TGeoTabManager.cxx:434
 TGeoTabManager.cxx:435
 TGeoTabManager.cxx:436
 TGeoTabManager.cxx:437
 TGeoTabManager.cxx:438
 TGeoTabManager.cxx:439
 TGeoTabManager.cxx:440
 TGeoTabManager.cxx:441
 TGeoTabManager.cxx:442
 TGeoTabManager.cxx:443
 TGeoTabManager.cxx:444
 TGeoTabManager.cxx:445
 TGeoTabManager.cxx:446
 TGeoTabManager.cxx:447
 TGeoTabManager.cxx:448
 TGeoTabManager.cxx:449
 TGeoTabManager.cxx:450
 TGeoTabManager.cxx:451
 TGeoTabManager.cxx:452
 TGeoTabManager.cxx:453
 TGeoTabManager.cxx:454
 TGeoTabManager.cxx:455
 TGeoTabManager.cxx:456
 TGeoTabManager.cxx:457
 TGeoTabManager.cxx:458
 TGeoTabManager.cxx:459
 TGeoTabManager.cxx:460
 TGeoTabManager.cxx:461
 TGeoTabManager.cxx:462
 TGeoTabManager.cxx:463
 TGeoTabManager.cxx:464
 TGeoTabManager.cxx:465
 TGeoTabManager.cxx:466
 TGeoTabManager.cxx:467
 TGeoTabManager.cxx:468
 TGeoTabManager.cxx:469
 TGeoTabManager.cxx:470
 TGeoTabManager.cxx:471
 TGeoTabManager.cxx:472
 TGeoTabManager.cxx:473
 TGeoTabManager.cxx:474
 TGeoTabManager.cxx:475
 TGeoTabManager.cxx:476
 TGeoTabManager.cxx:477
 TGeoTabManager.cxx:478
 TGeoTabManager.cxx:479
 TGeoTabManager.cxx:480
 TGeoTabManager.cxx:481
 TGeoTabManager.cxx:482
 TGeoTabManager.cxx:483
 TGeoTabManager.cxx:484
 TGeoTabManager.cxx:485
 TGeoTabManager.cxx:486
 TGeoTabManager.cxx:487
 TGeoTabManager.cxx:488
 TGeoTabManager.cxx:489
 TGeoTabManager.cxx:490
 TGeoTabManager.cxx:491
 TGeoTabManager.cxx:492
 TGeoTabManager.cxx:493
 TGeoTabManager.cxx:494
 TGeoTabManager.cxx:495
 TGeoTabManager.cxx:496
 TGeoTabManager.cxx:497
 TGeoTabManager.cxx:498
 TGeoTabManager.cxx:499
 TGeoTabManager.cxx:500
 TGeoTabManager.cxx:501
 TGeoTabManager.cxx:502
 TGeoTabManager.cxx:503
 TGeoTabManager.cxx:504
 TGeoTabManager.cxx:505
 TGeoTabManager.cxx:506
 TGeoTabManager.cxx:507
 TGeoTabManager.cxx:508
 TGeoTabManager.cxx:509
 TGeoTabManager.cxx:510
 TGeoTabManager.cxx:511
 TGeoTabManager.cxx:512
 TGeoTabManager.cxx:513
 TGeoTabManager.cxx:514
 TGeoTabManager.cxx:515
 TGeoTabManager.cxx:516
 TGeoTabManager.cxx:517
 TGeoTabManager.cxx:518
 TGeoTabManager.cxx:519
 TGeoTabManager.cxx:520
 TGeoTabManager.cxx:521
 TGeoTabManager.cxx:522
 TGeoTabManager.cxx:523
 TGeoTabManager.cxx:524
 TGeoTabManager.cxx:525
 TGeoTabManager.cxx:526
 TGeoTabManager.cxx:527
 TGeoTabManager.cxx:528
 TGeoTabManager.cxx:529
 TGeoTabManager.cxx:530
 TGeoTabManager.cxx:531
 TGeoTabManager.cxx:532
 TGeoTabManager.cxx:533
 TGeoTabManager.cxx:534
 TGeoTabManager.cxx:535
 TGeoTabManager.cxx:536
 TGeoTabManager.cxx:537
 TGeoTabManager.cxx:538
 TGeoTabManager.cxx:539
 TGeoTabManager.cxx:540
 TGeoTabManager.cxx:541
 TGeoTabManager.cxx:542
 TGeoTabManager.cxx:543
 TGeoTabManager.cxx:544
 TGeoTabManager.cxx:545
 TGeoTabManager.cxx:546
 TGeoTabManager.cxx:547
 TGeoTabManager.cxx:548
 TGeoTabManager.cxx:549
 TGeoTabManager.cxx:550
 TGeoTabManager.cxx:551
 TGeoTabManager.cxx:552
 TGeoTabManager.cxx:553
 TGeoTabManager.cxx:554
 TGeoTabManager.cxx:555
 TGeoTabManager.cxx:556
 TGeoTabManager.cxx:557
 TGeoTabManager.cxx:558
 TGeoTabManager.cxx:559
 TGeoTabManager.cxx:560
 TGeoTabManager.cxx:561
 TGeoTabManager.cxx:562
 TGeoTabManager.cxx:563
 TGeoTabManager.cxx:564
 TGeoTabManager.cxx:565
 TGeoTabManager.cxx:566
 TGeoTabManager.cxx:567
 TGeoTabManager.cxx:568
 TGeoTabManager.cxx:569
 TGeoTabManager.cxx:570
 TGeoTabManager.cxx:571
 TGeoTabManager.cxx:572
 TGeoTabManager.cxx:573
 TGeoTabManager.cxx:574
 TGeoTabManager.cxx:575
 TGeoTabManager.cxx:576
 TGeoTabManager.cxx:577
 TGeoTabManager.cxx:578
 TGeoTabManager.cxx:579
 TGeoTabManager.cxx:580
 TGeoTabManager.cxx:581
 TGeoTabManager.cxx:582
 TGeoTabManager.cxx:583
 TGeoTabManager.cxx:584
 TGeoTabManager.cxx:585
 TGeoTabManager.cxx:586
 TGeoTabManager.cxx:587
 TGeoTabManager.cxx:588
 TGeoTabManager.cxx:589
 TGeoTabManager.cxx:590
 TGeoTabManager.cxx:591
 TGeoTabManager.cxx:592
 TGeoTabManager.cxx:593
 TGeoTabManager.cxx:594
 TGeoTabManager.cxx:595
 TGeoTabManager.cxx:596
 TGeoTabManager.cxx:597
 TGeoTabManager.cxx:598
 TGeoTabManager.cxx:599
 TGeoTabManager.cxx:600
 TGeoTabManager.cxx:601
 TGeoTabManager.cxx:602
 TGeoTabManager.cxx:603
 TGeoTabManager.cxx:604
 TGeoTabManager.cxx:605
 TGeoTabManager.cxx:606
 TGeoTabManager.cxx:607
 TGeoTabManager.cxx:608
 TGeoTabManager.cxx:609
 TGeoTabManager.cxx:610
 TGeoTabManager.cxx:611
 TGeoTabManager.cxx:612
 TGeoTabManager.cxx:613
 TGeoTabManager.cxx:614
 TGeoTabManager.cxx:615
 TGeoTabManager.cxx:616
 TGeoTabManager.cxx:617
 TGeoTabManager.cxx:618
 TGeoTabManager.cxx:619
 TGeoTabManager.cxx:620
 TGeoTabManager.cxx:621
 TGeoTabManager.cxx:622
 TGeoTabManager.cxx:623
 TGeoTabManager.cxx:624
 TGeoTabManager.cxx:625
 TGeoTabManager.cxx:626
 TGeoTabManager.cxx:627
 TGeoTabManager.cxx:628
 TGeoTabManager.cxx:629
 TGeoTabManager.cxx:630
 TGeoTabManager.cxx:631
 TGeoTabManager.cxx:632
 TGeoTabManager.cxx:633
 TGeoTabManager.cxx:634
 TGeoTabManager.cxx:635
 TGeoTabManager.cxx:636
 TGeoTabManager.cxx:637
 TGeoTabManager.cxx:638
 TGeoTabManager.cxx:639
 TGeoTabManager.cxx:640
 TGeoTabManager.cxx:641
 TGeoTabManager.cxx:642
 TGeoTabManager.cxx:643
 TGeoTabManager.cxx:644
 TGeoTabManager.cxx:645
 TGeoTabManager.cxx:646
 TGeoTabManager.cxx:647
 TGeoTabManager.cxx:648
 TGeoTabManager.cxx:649
 TGeoTabManager.cxx:650
 TGeoTabManager.cxx:651
 TGeoTabManager.cxx:652
 TGeoTabManager.cxx:653
 TGeoTabManager.cxx:654
 TGeoTabManager.cxx:655
 TGeoTabManager.cxx:656
 TGeoTabManager.cxx:657
 TGeoTabManager.cxx:658
 TGeoTabManager.cxx:659
 TGeoTabManager.cxx:660
 TGeoTabManager.cxx:661
 TGeoTabManager.cxx:662
 TGeoTabManager.cxx:663
 TGeoTabManager.cxx:664
 TGeoTabManager.cxx:665
 TGeoTabManager.cxx:666
 TGeoTabManager.cxx:667
 TGeoTabManager.cxx:668
 TGeoTabManager.cxx:669
 TGeoTabManager.cxx:670
 TGeoTabManager.cxx:671
 TGeoTabManager.cxx:672
 TGeoTabManager.cxx:673
 TGeoTabManager.cxx:674
 TGeoTabManager.cxx:675
 TGeoTabManager.cxx:676
 TGeoTabManager.cxx:677
 TGeoTabManager.cxx:678
 TGeoTabManager.cxx:679
 TGeoTabManager.cxx:680
 TGeoTabManager.cxx:681
 TGeoTabManager.cxx:682
 TGeoTabManager.cxx:683
 TGeoTabManager.cxx:684
 TGeoTabManager.cxx:685
 TGeoTabManager.cxx:686
 TGeoTabManager.cxx:687
 TGeoTabManager.cxx:688
 TGeoTabManager.cxx:689
 TGeoTabManager.cxx:690
 TGeoTabManager.cxx:691
 TGeoTabManager.cxx:692
 TGeoTabManager.cxx:693
 TGeoTabManager.cxx:694
 TGeoTabManager.cxx:695
 TGeoTabManager.cxx:696
 TGeoTabManager.cxx:697
 TGeoTabManager.cxx:698
 TGeoTabManager.cxx:699
 TGeoTabManager.cxx:700
 TGeoTabManager.cxx:701
 TGeoTabManager.cxx:702
 TGeoTabManager.cxx:703
 TGeoTabManager.cxx:704
 TGeoTabManager.cxx:705
 TGeoTabManager.cxx:706
 TGeoTabManager.cxx:707
 TGeoTabManager.cxx:708
 TGeoTabManager.cxx:709
 TGeoTabManager.cxx:710
 TGeoTabManager.cxx:711
 TGeoTabManager.cxx:712
 TGeoTabManager.cxx:713
 TGeoTabManager.cxx:714
 TGeoTabManager.cxx:715
 TGeoTabManager.cxx:716
 TGeoTabManager.cxx:717
 TGeoTabManager.cxx:718
 TGeoTabManager.cxx:719
 TGeoTabManager.cxx:720
 TGeoTabManager.cxx:721
 TGeoTabManager.cxx:722
 TGeoTabManager.cxx:723
 TGeoTabManager.cxx:724
 TGeoTabManager.cxx:725
 TGeoTabManager.cxx:726
 TGeoTabManager.cxx:727
 TGeoTabManager.cxx:728
 TGeoTabManager.cxx:729
 TGeoTabManager.cxx:730
 TGeoTabManager.cxx:731
 TGeoTabManager.cxx:732
 TGeoTabManager.cxx:733
 TGeoTabManager.cxx:734
 TGeoTabManager.cxx:735
 TGeoTabManager.cxx:736
 TGeoTabManager.cxx:737
 TGeoTabManager.cxx:738
 TGeoTabManager.cxx:739
 TGeoTabManager.cxx:740
 TGeoTabManager.cxx:741
 TGeoTabManager.cxx:742
 TGeoTabManager.cxx:743
 TGeoTabManager.cxx:744
 TGeoTabManager.cxx:745
 TGeoTabManager.cxx:746
 TGeoTabManager.cxx:747
 TGeoTabManager.cxx:748
 TGeoTabManager.cxx:749
 TGeoTabManager.cxx:750
 TGeoTabManager.cxx:751
 TGeoTabManager.cxx:752
 TGeoTabManager.cxx:753
 TGeoTabManager.cxx:754
 TGeoTabManager.cxx:755
 TGeoTabManager.cxx:756
 TGeoTabManager.cxx:757
 TGeoTabManager.cxx:758
 TGeoTabManager.cxx:759
 TGeoTabManager.cxx:760
 TGeoTabManager.cxx:761
 TGeoTabManager.cxx:762
 TGeoTabManager.cxx:763
 TGeoTabManager.cxx:764
 TGeoTabManager.cxx:765
 TGeoTabManager.cxx:766
 TGeoTabManager.cxx:767
 TGeoTabManager.cxx:768
 TGeoTabManager.cxx:769
 TGeoTabManager.cxx:770
 TGeoTabManager.cxx:771
 TGeoTabManager.cxx:772
 TGeoTabManager.cxx:773
 TGeoTabManager.cxx:774
 TGeoTabManager.cxx:775
 TGeoTabManager.cxx:776
 TGeoTabManager.cxx:777
 TGeoTabManager.cxx:778
 TGeoTabManager.cxx:779
 TGeoTabManager.cxx:780
 TGeoTabManager.cxx:781
 TGeoTabManager.cxx:782
 TGeoTabManager.cxx:783
 TGeoTabManager.cxx:784
 TGeoTabManager.cxx:785
 TGeoTabManager.cxx:786
 TGeoTabManager.cxx:787
 TGeoTabManager.cxx:788
 TGeoTabManager.cxx:789
 TGeoTabManager.cxx:790
 TGeoTabManager.cxx:791
 TGeoTabManager.cxx:792
 TGeoTabManager.cxx:793
 TGeoTabManager.cxx:794
 TGeoTabManager.cxx:795
 TGeoTabManager.cxx:796
 TGeoTabManager.cxx:797
 TGeoTabManager.cxx:798
 TGeoTabManager.cxx:799
 TGeoTabManager.cxx:800
 TGeoTabManager.cxx:801
 TGeoTabManager.cxx:802
 TGeoTabManager.cxx:803
 TGeoTabManager.cxx:804
 TGeoTabManager.cxx:805
 TGeoTabManager.cxx:806
 TGeoTabManager.cxx:807
 TGeoTabManager.cxx:808
 TGeoTabManager.cxx:809
 TGeoTabManager.cxx:810
 TGeoTabManager.cxx:811
 TGeoTabManager.cxx:812
 TGeoTabManager.cxx:813
 TGeoTabManager.cxx:814
 TGeoTabManager.cxx:815
 TGeoTabManager.cxx:816
 TGeoTabManager.cxx:817
 TGeoTabManager.cxx:818
 TGeoTabManager.cxx:819
 TGeoTabManager.cxx:820
 TGeoTabManager.cxx:821
 TGeoTabManager.cxx:822
 TGeoTabManager.cxx:823
 TGeoTabManager.cxx:824
 TGeoTabManager.cxx:825
 TGeoTabManager.cxx:826
 TGeoTabManager.cxx:827
 TGeoTabManager.cxx:828
 TGeoTabManager.cxx:829