ROOT logo
// @(#):$Id: TGeoManagerEditor.cxx 21494 2007-12-19 15:50:40Z brun $
// 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.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TGeoManagerEditor                                                    //
//
//////////////////////////////////////////////////////////////////////////
/*
   Editor for TGeoManager class. Provides also builder functionality for the 
   main TGeo objects: TGeoVolume, TGeoShape - derived classes, TGeoMaterial,
   TGeoMatrix - derived transformations and TGeoMedium.
   The GUI represents the main entry point for editing geometry classes. It
   can be started either by:
   1. TGeoManager::Edit(). The method must be used when starting from a new 
   geometry.
   2. Left-click on the 40x40 pixels top-right corner of a pad containing a
   drawn volume. The region is always accesible when drawing geometry elements 
   and allows also restoring the manager editor in the "Style" tab of the GED
   editor anytime.
   
   The TGeoManager editor is vertically split by a TGShutter widget into the
   following categories:
   
   - General. This allows changing the name/title of the geometry, setting the
   top volume, closing the geometry and saving the geometry in a file. The name
   of the geometry file is formed by geometry_name.C/.root depending if the geometry
   need to be saved as a C macro or a .root file.
   - Shapes. The category provide buttons for creation of all supported shapes. The 
   new shape name is chosen by the interface, but can be changed from the shape 
   editor GUI. Existing shapes can be browsed and edited from the same category. 
   - Volumes. The category allows the creation of a new volume having a given name,
   shape and medium. For creating a volume assembly only the name is relevant. 
   Existing volumes can be browsed or edited from this category.
   - Materials. Allows creation of new materials/mixtures or editing existing ones.
   - Media. The same for creation/editing of tracking media (materials having a set
   of properties related to tracking)
   - Matrices. Allows creation of translations, rotations or combined transformations.
   Existing matrices can also be browser/edited.   
*/   

#include "TVirtualPad.h"
#include "TCanvas.h"
#include "TBaseClass.h"
#include "TGTab.h"
#include "TG3DLine.h"
#include "TGComboBox.h"
#include "TGButton.h"
#include "TGButtonGroup.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"
#include "TGLabel.h"
#include "TGShutter.h"

#include "TGeoVolumeEditor.h"
#include "TGeoNodeEditor.h"
#include "TGeoTabManager.h"
#include "TGeoVolume.h"
#include "TGeoManager.h"
#include "TGeoMatrix.h"
#include "TGeoBBox.h"
#include "TGeoPara.h"
#include "TGeoArb8.h"
#include "TGeoTube.h"
#include "TGeoEltu.h"
#include "TGeoHype.h"
#include "TGeoTorus.h"
#include "TGeoTrd1.h"
#include "TGeoTrd2.h"
#include "TGeoCone.h"
#include "TGeoSphere.h"
#include "TGeoPcon.h"
#include "TGeoPgon.h"
#include "TGeoElement.h"
#include "TGeoMaterial.h"
#include "TView.h"

#include "TGeoManagerEditor.h"
#include "TGedEditor.h"

ClassImp(TGeoManagerEditor)

enum ETGeoVolumeWid {
   kMANAGER_NAME, kMANAGER_TITLE, 
   kMANAGER_SHAPE_SELECT, kMANAGER_MEDIA_SELECT,kMANAGER_MATERIAL_SELECT, kMANAGER_ELEMENT_SELECT,
   kMANAGER_SHAPE_SELECT2, kMANAGER_MEDIUM_SELECT2, kMANAGER_VOLUME_SELECT,
   kMANAGER_EDIT_SHAPE, kMANAGER_EDIT_MEDIUM, kMANAGER_DENSITY_SELECT, kMANAGER_NELEM_SELECT,
   kMANAGER_MATERIAL_SELECT2, kMANAGER_MEDIUM_SELECT, kMANAGER_MATRIX_SELECT, kMANAGER_TOP_SELECT,
   kEXPORT_ROOT, kEXPORT_C, kEXPORT_GEOMETRY,
   kCAT_GENERAL, kCAT_SHAPES, kCAT_VOLUMES, kCAT_MEDIA, kCAT_MATERIALS, kCAT_MATRICES,
   kCREATE_BOX, kCREATE_PARA, kCREATE_TRD1, kCREATE_TRD2,
   kCREATE_TRAP, kCREATE_GTRA, kCREATE_XTRU, kCREATE_ARB8,
   kCREATE_TUBE, kCREATE_TUBS, kCREATE_CONE, kCREATE_CONS,
   kCREATE_SPHE, kCREATE_CTUB, kCREATE_ELTU, kCREATE_TORUS,
   kCREATE_PCON, kCREATE_PGON, kCREATE_HYPE, kCREATE_PARAB, kCREATE_COMP,
   kCREATE_MATERIAL, kCREATE_MIXTURE, kCREATE_MEDIUM, kCREATE_VOLUME, kCREATE_ASSEMBLY,
   kCREATE_TRANSLATION, kCREATE_ROTATION, kCREATE_COMBI,
   kMEDIUM_NAME, kMEDIUM_ID, kMATRIX_NAME, kMATERIAL_NAME, kVOLUME_NAME,
   kMANAGER_APPLY, kMANAGER_CANCEL, kMANAGER_UNDO
};

//______________________________________________________________________________
TGeoManagerEditor::TGeoManagerEditor(const TGWindow *p, Int_t width,
                                     Int_t height, UInt_t options, Pixel_t back)
   : TGedFrame(p, width, height, options | kVerticalFrame, back)
{
   // Constructor for manager editor.
   fGeometry = gGeoManager;
   fTabMgr   = 0;
   fTab      = 0;
   fConnectedCanvas = 0;

   fIsModified = kFALSE;   
   TGCompositeFrame *f1;
   TGLabel *label;
   
   // TGShutter for categories
   fCategories = new TGShutter(this, kSunkenFrame | kFixedHeight);

   TGCompositeFrame *container;
   Pixel_t color;
   // General settings
   TGShutterItem *si = new TGShutterItem(fCategories, new TGHotString("General"),kCAT_GENERAL);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);
   // TextEntry for manager name
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Name/Title"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
   fManagerName = new TGTextEntry(container, new TGTextBuffer(50), kMANAGER_NAME);
   fManagerName->Resize(135, fManagerName->GetDefaultHeight());
   fManagerName->SetToolTipText("Enter the geometry name");
   container->AddFrame(fManagerName, new TGLayoutHints(kLHintsLeft, 3, 1, 0, 0));
   fManagerTitle = new TGTextEntry(container, new TGTextBuffer(50), kMANAGER_TITLE);
   fManagerTitle->Resize(135, fManagerTitle->GetDefaultHeight());
   fManagerTitle->SetToolTipText("Enter the geometry name");
   container->AddFrame(fManagerTitle, new TGLayoutHints(kLHintsLeft, 3, 1, 0, 0));
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Export geometry"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 6, 0));
   TString stitle = "Options";
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   TGButtonGroup *bg = new TGVButtonGroup(f1, stitle);
   fExportOption[0] = new TGRadioButton(bg, ".root", kEXPORT_ROOT);
   fExportOption[1] = new TGRadioButton(bg, ".C", kEXPORT_C);
   fExportButton = new TGTextButton(f1, "Export", kEXPORT_GEOMETRY);
   bg->SetRadioButtonExclusive();
   bg->SetButton(kEXPORT_ROOT);
   bg->Show();
   f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(fExportButton, new TGLayoutHints(kLHintsLeft, 20, 2, 22, 0));
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2));
   // Close geometry
   f7 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f7, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Close geometry"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f7->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
   f1 = new TGCompositeFrame(f7, 155, 30, kHorizontalFrame | kFixedWidth);
   fLSelTop = new TGLabel(f1, "Select top");
   gClient->GetColorByName("#0000ff", color);
   fLSelTop->SetTextColor(color);
   fLSelTop->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelTop, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelTop = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_TOP_SELECT);
   fBSelTop->SetToolTipText("Select the top volume");
   fBSelTop->Associate(this);
   f1->AddFrame(fBSelTop, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   fCloseGeometry = new TGTextButton(f1, "Close");
   f1->AddFrame(fCloseGeometry, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   fCloseGeometry->SetToolTipText("Close geometry to make it ready for tracking");
   fCloseGeometry->Associate(this);
   f7->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f7, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   

   si = new TGShutterItem(fCategories, new TGHotString("Shapes"),kCAT_SHAPES);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);

   // Shape creators
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Create new shape"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
   TGLayoutHints *lhb = new TGLayoutHints(kLHintsLeft, 0, 4, 0, 0);
   TGLayoutHints *lhf1 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 2, 2, 2, 2);
   Int_t ipict;
   f1 = new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
   fShapeButton[0] = new TGPictureButton(f1, fClient->GetPicture("geobbox_t.xpm"), kCREATE_BOX);
   fShapeButton[0]->SetToolTipText("Create a box");
   fShapeButton[1] = new TGPictureButton(f1, fClient->GetPicture("geopara_t.xpm"), kCREATE_PARA);
   fShapeButton[1]->SetToolTipText("Create a parallelipiped");
   fShapeButton[2] = new TGPictureButton(f1, fClient->GetPicture("geotrd1_t.xpm"), kCREATE_TRD1);
   fShapeButton[2]->SetToolTipText("Create a TRD1 trapezoid");
   fShapeButton[3] = new TGPictureButton(f1, fClient->GetPicture("geotrd2_t.xpm"), kCREATE_TRD2);
   fShapeButton[3]->SetToolTipText("Create a TRD2 trapezoid");
   fShapeButton[4] = new TGPictureButton(f1, fClient->GetPicture("geotrap_t.xpm"), kCREATE_TRAP);
   fShapeButton[4]->SetToolTipText("Create a general trapezoid");
   fShapeButton[5] = new TGPictureButton(f1, fClient->GetPicture("geogtra_t.xpm"), kCREATE_GTRA);
   fShapeButton[5]->SetToolTipText("Create a general twisted trapezoid");
   for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict],lhb);
   container->AddFrame(f1, lhf1);
   f1 = new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
   fShapeButton[6] = new TGPictureButton(f1, fClient->GetPicture("geoxtru_t.xpm"), kCREATE_XTRU);
   fShapeButton[6]->SetToolTipText("Create a extruded polygone");
   fShapeButton[7] = new TGPictureButton(f1, fClient->GetPicture("geoarb8_t.xpm"), kCREATE_ARB8);
   fShapeButton[7]->SetToolTipText("Create an arbitrary trapezoid with 8 vertices");
   fShapeButton[8] = new TGPictureButton(f1, fClient->GetPicture("geotube_t.xpm"), kCREATE_TUBE);
   fShapeButton[8]->SetToolTipText("Create a cylindrical pipe");
   fShapeButton[9] = new TGPictureButton(f1, fClient->GetPicture("geotubeseg_t.xpm"), kCREATE_TUBS);
   fShapeButton[9]->SetToolTipText("Create a cylindrical pipe within a phi range");
   fShapeButton[10] = new TGPictureButton(f1, fClient->GetPicture("geocone_t.xpm"), kCREATE_CONE);
   fShapeButton[10]->SetToolTipText("Create a conical pipe");
   fShapeButton[11] = new TGPictureButton(f1, fClient->GetPicture("geoconeseg_t.xpm"), kCREATE_CONS);
   fShapeButton[11]->SetToolTipText("Create a conical pipe within a phi range");
   for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict+6],lhb);
   container->AddFrame(f1, lhf1);
   f1 = new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
   fShapeButton[12] = new TGPictureButton(f1, fClient->GetPicture("geosphere_t.xpm"), kCREATE_SPHE);
   fShapeButton[12]->SetToolTipText("Create a spherical sector");
   fShapeButton[13] = new TGPictureButton(f1, fClient->GetPicture("geoctub_t.xpm"), kCREATE_CTUB);
   fShapeButton[13]->SetToolTipText("Create a cut tube");
   fShapeButton[14] = new TGPictureButton(f1, fClient->GetPicture("geoeltu_t.xpm"), kCREATE_ELTU);
   fShapeButton[14]->SetToolTipText("Create an eliptical tube");
   fShapeButton[15] = new TGPictureButton(f1, fClient->GetPicture("geotorus_t.xpm"), kCREATE_TORUS);
   fShapeButton[15]->SetToolTipText("Create a toroidal tube with a phi range");
   fShapeButton[16] = new TGPictureButton(f1, fClient->GetPicture("geopcon_t.xpm"), kCREATE_PCON);
   fShapeButton[16]->SetToolTipText("Create a polycone shape");
   fShapeButton[17] = new TGPictureButton(f1, fClient->GetPicture("geopgon_t.xpm"), kCREATE_PGON);
   fShapeButton[17]->SetToolTipText("Create a polygon shape");
   for (ipict=0; ipict<6; ipict++) f1->AddFrame(fShapeButton[ipict+12],lhb);
   container->AddFrame(f1, lhf1);
   f1 = new TGCompositeFrame(container, 118, 30, kHorizontalFrame);
   fShapeButton[18] = new TGPictureButton(f1, fClient->GetPicture("geohype_t.xpm"), kCREATE_HYPE);
   fShapeButton[18]->SetToolTipText("Create a hyperboloid");
   fShapeButton[19] = new TGPictureButton(f1, fClient->GetPicture("geoparab_t.xpm"), kCREATE_PARAB);
   fShapeButton[19]->SetToolTipText("Create a paraboloid");
   fShapeButton[20] = new TGPictureButton(f1, fClient->GetPicture("geocomposite_t.xpm"), kCREATE_COMP);
   fShapeButton[20]->SetToolTipText("Create a composite shape");
   for (ipict=0; ipict<3; ipict++) f1->AddFrame(fShapeButton[ipict+18],lhb);
   container->AddFrame(f1, lhf1);

   // List of shapes
   f2 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f2, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Existing shapes"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f2->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
   f1 = new TGCompositeFrame(f2, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedShape = 0;
   fLSelShape = new TGLabel(f1, "Select shape");
   gClient->GetColorByName("#0000ff", color);
   fLSelShape->SetTextColor(color);
   fLSelShape->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelShape, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelShape = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_SHAPE_SELECT);
   fBSelShape->SetToolTipText("Select one of the existing shapes");
   fBSelShape->Associate(this);
   f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   fEditShape = new TGTextButton(f1, "Edit");
   f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   fEditShape->SetToolTipText("Edit selected shape");
   fEditShape->Associate(this);   
   f2->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f2, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
   
   // Volumes category
   si = new TGShutterItem(fCategories, new TGHotString("Volumes"),kCAT_VOLUMES);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);

   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Create new volume"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));

   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Name"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fVolumeName = new TGTextEntry(f1, new TGTextBuffer(50), kVOLUME_NAME);
   fVolumeName->Resize(100, fVolumeName->GetDefaultHeight());
   fVolumeName->SetToolTipText("Enter the name for the new volume");
   f1->AddFrame(fVolumeName, new TGLayoutHints(kLHintsRight, 3, 1, 2, 5));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));

   // ComboBox for shape component
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedShape2 = 0;
   fLSelShape2 = new TGLabel(f1, "Select shape");
   gClient->GetColorByName("#0000ff", color);
   fLSelShape2->SetTextColor(color);
   fLSelShape2->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelShape2, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelShape2 = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_SHAPE_SELECT2);
   fBSelShape2->SetToolTipText("Select one of the existing shapes");
   fBSelShape2->Associate(this);
   f1->AddFrame(fBSelShape2, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));

   // ComboBox for medium component
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedMedium2 = 0;
   fLSelMedium2 = new TGLabel(f1, "Select medium");
   gClient->GetColorByName("#0000ff", color);
   fLSelMedium2->SetTextColor(color);
   fLSelMedium2->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelMedium2, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelMedium2 = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_MEDIUM_SELECT2);
   fBSelMedium2->SetToolTipText("Select one of the existing media");
   fBSelMedium2->Associate(this);
   f1->AddFrame(fBSelMedium2, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
   // Picture buttons for different volumes
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Create..."), new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
   fVolumeButton[0] = new TGPictureButton(f1, fClient->GetPicture("geovolume_t.xpm"), kCREATE_VOLUME);
   fVolumeButton[0]->SetToolTipText("Create a new volume from shape and medium");
   fVolumeButton[1] = new TGPictureButton(f1, fClient->GetPicture("geoassembly_t.xpm"), kCREATE_ASSEMBLY);
   fVolumeButton[1]->SetToolTipText("Create a new volume assemby having the selected name");
   for (ipict=0; ipict<2; ipict++) f1->AddFrame(fVolumeButton[ipict],lhb);
   container->AddFrame(f1, lhf1);
   // List of volumes
   f3 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f3, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Existing volumes"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f3->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
   f1 = new TGCompositeFrame(f3, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedVolume = 0;
   fLSelVolume = new TGLabel(f1, "Select volume");
   gClient->GetColorByName("#0000ff", color);
   fLSelVolume->SetTextColor(color);
   fLSelVolume->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelVolume, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelVolume = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_VOLUME_SELECT);
   fBSelVolume->SetToolTipText("Select one of the existing volumes");
   fBSelVolume->Associate(this);
   f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   f3->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
   f1 = new TGCompositeFrame(f3, 155, 30, kHorizontalFrame | kFixedWidth);
   fEditVolume = new TGTextButton(f1, " Edit ");
   f1->AddFrame(fEditVolume, new TGLayoutHints(kLHintsLeft, 20, 1, 2, 2));
   fEditVolume->SetToolTipText("Edit selected volume");
   fEditVolume->Associate(this);
   fSetTopVolume = new TGTextButton(f1, "Set top");
   f1->AddFrame(fSetTopVolume, new TGLayoutHints(kLHintsRight, 1, 20, 2, 2));
   fSetTopVolume->SetToolTipText("Set top volume for geometry");
   fSetTopVolume->Associate(this);
   f3->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f3, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));

   // Materials category
   si = new TGShutterItem(fCategories, new TGHotString("Materials"),kCAT_MATERIALS);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);

   // Material creators
   gGeoManager->BuildDefaultMaterials();
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Create material/mixt."), new TGLayoutHints(kLHintsLeft, 2, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Name"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fMaterialName = new TGTextEntry(f1, new TGTextBuffer(50), kMATERIAL_NAME);
   fMaterialName->Resize(100, fMaterialName->GetDefaultHeight());
   fMaterialName->SetToolTipText("Enter the new material name");
   f1->AddFrame(fMaterialName, new TGLayoutHints(kLHintsRight, 3, 1, 2, 5));
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));

   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Element"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fElementList = new TGComboBox(f1, kMANAGER_ELEMENT_SELECT);
   fElementList->Resize(100, fManagerName->GetDefaultHeight());
   TGeoElementTable *table = gGeoManager->GetElementTable();
   if (table) {
      TGeoElement *element;
      for (Int_t i=0; i<table->GetNelements(); i++) {
         element = table->GetElement(i);
         fElementList->AddEntry(element->GetTitle(),i);
      }
   }      
   fElementList->Select(0);
   f1->AddFrame(fElementList, new TGLayoutHints(kLHintsRight, 2, 2, 4, 4));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
   // Number entry for density
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Density"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fEntryDensity = new TGNumberEntry(f1, 0., 5, kMANAGER_DENSITY_SELECT);
   fEntryDensity->SetNumStyle(TGNumberFormat::kNESRealThree);
   fEntryDensity->SetNumAttr(TGNumberFormat::kNEANonNegative);
   fEntryDensity->Resize(100,fEntryDensity->GetDefaultHeight()); 
   TGTextEntry *nef = (TGTextEntry*)fEntryDensity->GetNumberEntry();
   nef->SetToolTipText("Enter material/mixture density");
   fEntryDensity->SetNumber(0);
   fEntryDensity->Associate(this);
   f1->AddFrame(fEntryDensity, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
   // Buttons for creating materials/mixtures
   // Picture buttons for different volumes
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Create..."), new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
   fMaterialButton[0] = new TGPictureButton(f1, fClient->GetPicture("geomaterial_t.xpm"), kCREATE_MATERIAL);
   fMaterialButton[0]->SetToolTipText("Create a new material from element and density");
   fMaterialButton[1] = new TGPictureButton(f1, fClient->GetPicture("geomixture_t.xpm"), kCREATE_MIXTURE);
   fMaterialButton[1]->SetToolTipText("Create a new mixture with selected density");
   for (ipict=0; ipict<2; ipict++) f1->AddFrame(fMaterialButton[ipict],lhb);
   container->AddFrame(f1, lhf1);
   
   // List of materials
   f4 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f4, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Existing materials"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f4->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
   f1 = new TGCompositeFrame(f4, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedMaterial = 0;
   fLSelMaterial = new TGLabel(f1, "Select material");
   gClient->GetColorByName("#0000ff", color);
   fLSelMaterial->SetTextColor(color);
   fLSelMaterial->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelMaterial, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelMaterial = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_MATERIAL_SELECT);
   fBSelMaterial->SetToolTipText("Select one of the existing materials");
   fBSelMaterial->Associate(this);
   f1->AddFrame(fBSelMaterial, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   fEditMaterial = new TGTextButton(f1, "Edit");
   f1->AddFrame(fEditMaterial, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   fEditMaterial->SetToolTipText("Edit selected material");
   fEditMaterial->Associate(this);
   f4->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f4, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
   
   si = new TGShutterItem(fCategories, new TGHotString("Media"),kCAT_MEDIA);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);

   // Media category
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Create new medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));

   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Name"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fMediumName = new TGTextEntry(f1, new TGTextBuffer(50), kMEDIUM_NAME);
   fMediumName->Resize(60, fMediumName->GetDefaultHeight());
   fMediumName->SetToolTipText("Enter the new medium name");
   f1->AddFrame(fMediumName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));

   fMediumId = new TGNumberEntry(f1, 0., 5, kMEDIUM_ID);
   fMediumId->SetNumStyle(TGNumberFormat::kNESInteger);
   fMediumId->SetNumAttr(TGNumberFormat::kNEAPositive);
   fMediumId->Resize(35,fMediumId->GetDefaultHeight()); 
   nef = (TGTextEntry*)fMediumId->GetNumberEntry();
   nef->SetToolTipText("Enter medium ID");
   fMediumId->SetNumber(fGeometry->GetListOfMedia()->GetSize());
   fMediumId->Associate(this);
   f1->AddFrame(fMediumId, new TGLayoutHints(kLHintsRight, 2, 2, 2 ,2));
   f1->AddFrame(new TGLabel(f1, "ID"), new TGLayoutHints(kLHintsRight, 1, 1, 6, 0));   
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
   // ComboBox for materials
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedMaterial2 = 0;
   fLSelMaterial2 = new TGLabel(f1, "Select material");
   gClient->GetColorByName("#0000ff", color);
   fLSelMaterial2->SetTextColor(color);
   fLSelMaterial2->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelMaterial2, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelMaterial2 = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_MATERIAL_SELECT2);
   fBSelMaterial2->SetToolTipText("Select one of the existing materials");
   fBSelMaterial2->Associate(this);
   f1->AddFrame(fBSelMaterial2, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Create..."), new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
   fMediumButton = new TGPictureButton(f1, fClient->GetPicture("geomedium_t.xpm"), kCREATE_MEDIUM);
   fMediumButton->SetToolTipText("Create a new medium from selected material");
   fMediumButton->Associate(this);
   f1->AddFrame(fMediumButton, new TGLayoutHints(kLHintsLeft, 5, 2, 2, 2));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));

   // List of media
   f5 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f5, 145, 10, kHorizontalFrame | kLHintsExpandX | kFixedWidth | kOwnBackground);
   f1->AddFrame(label = new TGLabel(f1, "Existing media"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f5->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
   f1 = new TGCompositeFrame(f5, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedMedium = 0;
   fLSelMedium = new TGLabel(f1, "Select medium");
   gClient->GetColorByName("#0000ff", color);
   fLSelMedium->SetTextColor(color);
   fLSelMedium->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelMedium, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelMedium = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_MEDIA_SELECT);
   fBSelMedium->SetToolTipText("Select one of the existing media");
   fBSelMedium->Associate(this);
   f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   fEditMedium = new TGTextButton(f1, "Edit");
   f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   fEditMedium->SetToolTipText("Edit selected medium");
   fEditMedium->Associate(this);
   f5->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f5, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));

   // Matrix category
   si = new TGShutterItem(fCategories, new TGHotString("Matrices"),kCAT_MATRICES);
   container = (TGCompositeFrame*)si->GetContainer();
   container->SetBackgroundColor(GetDefaultFrameBackground());
   fCategories->AddItem(si);
   // Name entry
   f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Create new matrix"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));

   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Name"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
   fMatrixName = new TGTextEntry(f1, new TGTextBuffer(50), kMATRIX_NAME);
   fMatrixName->Resize(100, fMatrixName->GetDefaultHeight());
   fMatrixName->SetToolTipText("Enter the new matrix name");
   f1->AddFrame(fMatrixName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
   container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
   // Picture buttons for different matrices
   f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(new TGLabel(f1, "Create..."), new TGLayoutHints(kLHintsLeft, 1, 5, 6, 0));
   fMatrixButton[0] = new TGPictureButton(f1, fClient->GetPicture("geotranslation_t.xpm"), kCREATE_TRANSLATION);
   fMatrixButton[0]->SetToolTipText("Create a translation");
   fMatrixButton[1] = new TGPictureButton(f1, fClient->GetPicture("georotation_t.xpm"), kCREATE_ROTATION);
   fMatrixButton[1]->SetToolTipText("Create a rotation");
   fMatrixButton[2] = new TGPictureButton(f1, fClient->GetPicture("geocombi_t.xpm"), kCREATE_COMBI);
   fMatrixButton[2]->SetToolTipText("Create a rotation + translation");
   for (ipict=0; ipict<3; ipict++) f1->AddFrame(fMatrixButton[ipict],lhb);
   container->AddFrame(f1, lhf1);
   // List of matrices
   f6 = new TGCompositeFrame(container, 155, 10, kVerticalFrame | kFixedWidth);
   f1 = new TGCompositeFrame(f6, 155, 10, kHorizontalFrame | kFixedWidth);
   f1->AddFrame(label = new TGLabel(f1, "Existing matrices"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
   f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
   gClient->GetColorByName("#ff0000", color);
   label->SetTextColor(color);
   f6->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
   f1 = new TGCompositeFrame(f6, 155, 30, kHorizontalFrame | kFixedWidth);
   fSelectedMatrix = 0;
   fLSelMatrix = new TGLabel(f1, "Select matrix");
   gClient->GetColorByName("#0000ff", color);
   fLSelMatrix->SetTextColor(color);
   fLSelMatrix->ChangeOptions(kSunkenFrame | kDoubleBorder);
   f1->AddFrame(fLSelMatrix, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
   fBSelMatrix = new TGPictureButton(f1, fClient->GetPicture("rootdb_t.xpm"), kMANAGER_MATRIX_SELECT);
   fBSelMatrix->SetToolTipText("Select one of the existing matrices");
   fBSelMatrix->Associate(this);
   f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
   fEditMatrix = new TGTextButton(f1, "Edit");
   f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
   fEditMatrix->SetToolTipText("Edit selected matrix");
   fEditMatrix->Associate(this);
   f6->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
   container->AddFrame(f6, new TGLayoutHints(kLHintsLeft, 0, 0, 6, 0));
   
   fCategories->Resize(163,370);
   AddFrame(fCategories, new TGLayoutHints(kLHintsLeft, 0, 0, 4, 4));

   fVolumeTab = CreateEditorTabSubFrame("Volume");

   // Set the fTab and dissconnect editor from the canvas.
   fTab = fGedEditor->GetTab();
   TCanvas* edCanvas = fGedEditor->GetCanvas();
   fGedEditor->DisconnectFromCanvas();
   if (edCanvas != fConnectedCanvas) {
      DisconnectSelected();
      if (edCanvas)
         ConnectSelected(edCanvas);
      fConnectedCanvas = edCanvas;
   }
}

//______________________________________________________________________________
TGeoManagerEditor::~TGeoManagerEditor()
{
// Destructor.
   TGCompositeFrame *cont;
   cont = (TGCompositeFrame*)fCategories->GetItem("General")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("General")->SetCleanup(0);
   cont = (TGCompositeFrame*)fCategories->GetItem("Shapes")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("Shapes")->SetCleanup(0);
   cont = (TGCompositeFrame*)fCategories->GetItem("Volumes")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("Volumes")->SetCleanup(0);
   cont = (TGCompositeFrame*)fCategories->GetItem("Materials")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("Materials")->SetCleanup(0);
   cont = (TGCompositeFrame*)fCategories->GetItem("Media")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("Media")->SetCleanup(0);
   cont = (TGCompositeFrame*)fCategories->GetItem("Matrices")->GetContainer();
   TGeoTabManager::Cleanup(cont);
   fCategories->GetItem("Matrices")->SetCleanup(0);

   delete fExportOption[0]; delete fExportOption[1];

   Cleanup();   

   if (fTabMgr) {
      fTabMgr->GetVolumeTab()->Cleanup();
      delete fTabMgr;
   }   
}

//______________________________________________________________________________
void TGeoManagerEditor::SelectedSlot(TVirtualPad* /*pad*/, TObject* obj, Int_t event)
{
   // Connected to TCanvas::Selected. TGeoManagerEditor takes this
   // function from TGedEditor and only uses it if obj is a TGeoVolume.

   if (event == kButton1 && obj->InheritsFrom(TGeoVolume::Class())) {
      TGeoVolume* v = (TGeoVolume*) obj;
      fTabMgr->SetVolTabEnabled();
      fTabMgr->SetTab();
      fTabMgr->GetVolumeEditor(v);
      v->Draw();
   }
}

void TGeoManagerEditor::ConnectSelected(TCanvas *c)
{
   // Connect to TCanvas::Selected.

   c->Connect("Selected(TVirtualPad*,TObject*,Int_t)", "TGeoManagerEditor",
              this, "SelectedSlot(TVirtualPad*,TObject*,Int_t)");
}

void TGeoManagerEditor::DisconnectSelected()
{
   // Disconnect from TCanvas::Selected.

   if (fConnectedCanvas)
      Disconnect(fConnectedCanvas, "Selected(TVirtualPad*,TObject*,Int_t)",
                 this, "SelectedSlot(TVirtualPad*,TObject*,Int_t)");

}

//______________________________________________________________________________
void TGeoManagerEditor::ConnectSignals2Slots()
{
   // Connect signals to slots.
   fManagerName->Connect("TextChanged(const char *)", "TGeoManagerEditor", this, "DoName()");
   fManagerTitle->Connect("TextChanged(const char *)", "TGeoManagerEditor", this, "DoName()");
   fExportButton->Connect("Clicked()", "TGeoManagerEditor", this, "DoExportGeometry()");
   fCloseGeometry->Connect("Clicked()", "TGeoManagerEditor", this, "DoCloseGeometry()");
   fShapeButton[0]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateBox()");
   fShapeButton[1]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreatePara()");
   fShapeButton[2]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTrd1()");
   fShapeButton[3]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTrd2()");
   fShapeButton[4]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTrap()");
   fShapeButton[5]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateGtra()");
   fShapeButton[6]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateXtru()");
   fShapeButton[7]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateArb8()");
   fShapeButton[8]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTube()");
   fShapeButton[9]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTubs()");
   fShapeButton[10]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateCone()");
   fShapeButton[11]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateCons()");
   fShapeButton[12]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateSphe()");
   fShapeButton[13]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateCtub()");
   fShapeButton[14]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateEltu()");
   fShapeButton[15]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTorus()");
   fShapeButton[16]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreatePcon()");
   fShapeButton[17]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreatePgon()");
   fShapeButton[18]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateHype()");
   fShapeButton[19]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateParab()");
   fShapeButton[20]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateComposite()");
   fMatrixButton[0]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateTranslation()");
   fMatrixButton[1]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateRotation()");
   fMatrixButton[2]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateCombi()");
   fVolumeButton[0]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateVolume()");
   fVolumeButton[1]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateAssembly()");
   fBSelTop->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectTopVolume()");
   fBSelVolume->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectVolume()");
   fBSelShape->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectShape()");
   fBSelShape2->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectShape2()");
   fBSelMatrix->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectMatrix()");
   fBSelMaterial->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectMaterial()");
   fBSelMaterial2->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectMaterial2()");
   fBSelMedium->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectMedium()");
   fBSelMedium2->Connect("Clicked()", "TGeoManagerEditor", this, "DoSelectMedium2()");
   fSetTopVolume->Connect("Clicked()", "TGeoManagerEditor", this, "DoSetTopVolume()");
   fEditShape->Connect("Clicked()", "TGeoManagerEditor", this, "DoEditShape()");
   fEditMedium->Connect("Clicked()", "TGeoManagerEditor", this, "DoEditMedium()");
   fEditMaterial->Connect("Clicked()", "TGeoManagerEditor", this, "DoEditMaterial()");
   fEditMatrix->Connect("Clicked()", "TGeoManagerEditor", this, "DoEditMatrix()");
   fEditVolume->Connect("Clicked()", "TGeoManagerEditor", this, "DoEditVolume()");
   
   fMaterialButton[0]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateMaterial()");
   fMaterialButton[1]->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateMixture()");
   fMediumButton->Connect("Clicked()", "TGeoManagerEditor", this, "DoCreateMedium()");
}

//______________________________________________________________________________
void TGeoManagerEditor::SetModel(TObject* obj)
{
   // Refresh editor according the selected obj.
   fGeometry = (TGeoManager*)obj;
   fManagerName->SetText(fGeometry->GetName());
   fManagerTitle->SetText(fGeometry->GetTitle());
   fMatrixName->SetText(Form("matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
   fMaterialName->SetText(Form("material%i", fGeometry->GetListOfMaterials()->GetSize()));
   fMediumName->SetText(Form("medium%i", fGeometry->GetListOfMedia()->GetSize()));
   fVolumeName->SetText(Form("volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
   // Check if master volume can be set
   if (fGeometry->GetMasterVolume()) fSetTopVolume->SetEnabled(kFALSE);
   else fSetTopVolume->SetEnabled(kTRUE);
   // Check if geometry is already closed
   if (!fGeometry->IsClosed()) fCloseGeometry->SetEnabled(kTRUE);
   else {
      fCloseGeometry->SetEnabled(kFALSE);
      fBSelTop->SetEnabled(kFALSE);
   }   
   // Check if volumes category can be activated
   if (!fGeometry->GetListOfShapes()->GetEntries() || !fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kFALSE);
   else    
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   if (!fGeometry->GetListOfShapes()->GetEntries()) ShowSelectShape(kFALSE);
   else ShowSelectShape();
   if (!fGeometry->GetListOfVolumes()->GetEntries()) ShowSelectVolume(kFALSE);
   else ShowSelectVolume();
   if (!fGeometry->GetListOfMedia()->GetSize()) ShowSelectMedium(kFALSE);
   else ShowSelectMedium();
   if (!fGeometry->GetListOfMatrices()->GetEntries()) ShowSelectMatrix(kFALSE);
   else ShowSelectMatrix();

   // Check if media category can be activated
   if (!fGeometry->GetListOfMaterials()->GetSize()) {
      fCategories->GetItem("Media")->GetButton()->SetEnabled(kFALSE);
      ShowSelectMaterial(kFALSE);
   } else {
      fCategories->GetItem("Media")->GetButton()->SetEnabled(kTRUE);
      ShowSelectMaterial();
   }   
   
   fTab->SetTab(0);
   fCategories->Layout();
   if (fTabMgr == 0) {
      fTabMgr = TGeoTabManager::GetMakeTabManager(fGedEditor);
      fTabMgr->fVolumeTab  = fVolumeTab;
   }
   if (fInit) ConnectSignals2Slots();
   // SetActive();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoName()
{
// Change name/title of the geometry
   fGeometry->SetName(fManagerName->GetText());
   fGeometry->SetTitle(fManagerTitle->GetText());
}

//______________________________________________________________________________
void TGeoManagerEditor::DoExportGeometry()
{
// Export geometry as .root or .C file
   Bool_t asroot = fExportOption[0]->IsDown();
   TString s = fGeometry->GetName();
   s = s.Strip();
   s.Remove(20);
   const char *name;
   if (asroot) name = Form("%s.root", s.Data());
   else        name = Form("%s.C", s.Data());
   fGeometry->Export(name);
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateBox()
{
// Create a box.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoBBox(Form("box_%i",id), 1., 1., 1.);
   ShowSelectShape();
   // Check if volumes category can be activated
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreatePara()
{
// Create a parallelipiped.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoPara(Form("para_%i",id), 1., 1., 1., 30., 20., 45.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTrd1()
{
// Create a Trd1.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTrd1(Form("trd1_%i",id), 0.5, 1., 1., 1.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTrd2()
{
// Create a Trd2.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTrd2(Form("trd2_%i",id), 0.5, 1., 0.5, 1., 1.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTrap()
{
// Create a general trapezoid.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTrap(Form("trap_%i",id), 1., 15., 45., 0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateGtra()
{
// Create a twisted trapezoid.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoGtra(Form("gtra_%i",id), 1., 15., 45., 45.,0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateXtru()
{
// Create an extruded polygone.
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateArb8()
{
// Create an arbitrary polygone with maximum 8 vertices sitting on 2 parallel
// planes
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTube()
{
// Create a tube.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTube(Form("tube_%i",id), 0.5, 1., 1.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTubs()
{
// Create a tube segment.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTubeSeg(Form("tubs_%i",id), 0.5, 1., 1.,0.,45.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateCone()
{
// Create a cone.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoCone(Form("cone_%i",id), 0.5, 0.5, 1., 1.5, 2.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateCons()
{
// Create a cone segment.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoConeSeg(Form("cons_%i",id), 0.5, 0.5, 1., 1.5, 2.,0.,45.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateSphe()
{
// Create a sphere.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoSphere(Form("sphere_%i",id), 0.5, 1., 0., 180., 0.,360.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();   
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateCtub()
{
// Create a cut tube.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoCtub(Form("ctub_%i",id), 0.5, 1., 1.,0.,45.,0.,0.,-1,0.,0.,1);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateEltu()
{
// Create an eliptical tube.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoEltu(Form("para_%i",id), 1., 2., 1.5 );
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTorus()
{
// Create a torus shape.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoTorus(Form("torus_%i",id), 10., 1., 1.5, 0, 360.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();

}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreatePcon()
{
// Create a polycone shape.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoPcon(Form("pcon_%i",id), 0., 360., 2);
   ((TGeoPcon*)fSelectedShape)->DefineSection(0, -1, 0.5, 1.);
   ((TGeoPcon*)fSelectedShape)->DefineSection(1, 1, 0.2, 0.5);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();   
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreatePgon()
{
// Create a polygone shape.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoPgon(Form("pgon_%i",id), 0., 360.,6,2);
   ((TGeoPcon*)fSelectedShape)->DefineSection(0, -1, 0.5, 1.);
   ((TGeoPcon*)fSelectedShape)->DefineSection(1, 1, 0.2, 0.5);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();   
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateHype()
{
// Create a hyperboloid.
   Int_t id = gGeoManager->GetListOfShapes()->GetEntries();
   fSelectedShape = new TGeoHype(Form("hype_%i",id), 1., 15., 2., 30., 5.);
   ShowSelectShape();
   if (fGeometry->GetListOfMedia()->GetSize())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditShape();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateParab()
{
// Create a paraboloid.
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateComposite()
{
// Create a composite shape.
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateMaterial()
{
// Create a new material.
   TGeoElement *el = fGeometry->GetElementTable()->GetElement(fElementList->GetSelected());
   Double_t density = fEntryDensity->GetNumber();
   const char *name = fMaterialName->GetText();
   fSelectedMaterial = new TGeoMaterial(name, el, density);
   ShowSelectMaterial();
   fCategories->GetItem("Media")->GetButton()->SetEnabled(kTRUE);
   DoEditMaterial();
   fMaterialName->SetText(Form("material%i", fGeometry->GetListOfMaterials()->GetSize()));
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateMixture()
{
// Create a new mixture.
   Double_t density = fEntryDensity->GetNumber();
   const char *name = fMaterialName->GetText();
   fSelectedMaterial = new TGeoMixture(name, 1, density);
   ShowSelectMaterial();
   fCategories->GetItem("Media")->GetButton()->SetEnabled(kTRUE);
   DoEditMaterial();
   fMaterialName->SetText(Form("material%i", fGeometry->GetListOfMaterials()->GetSize()));
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateMedium()
{
// Create a new medium.
   Int_t id = fMediumId->GetIntNumber();
   if (!fSelectedMaterial2) return;
   const char *name = fMediumName->GetText();
   fSelectedMedium = new TGeoMedium(name, id, fSelectedMaterial2);
   ShowSelectMedium();
   if (fGeometry->GetListOfShapes()->GetEntries())
      fCategories->GetItem("Volumes")->GetButton()->SetEnabled(kTRUE);
   DoEditMedium();
   fMediumName->SetText(Form("medium%i", fGeometry->GetListOfMedia()->GetSize()));
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateTranslation()
{
// Create a new translation.
   const char *name = fMatrixName->GetText();
   fSelectedMatrix = new TGeoTranslation(name, 0., 0., 0.);
   fSelectedMatrix->SetBit(TGeoMatrix::kGeoTranslation);
   fSelectedMatrix->RegisterYourself();
   ShowSelectMatrix();
   DoEditMatrix();
   fMatrixName->SetText(Form("matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
}   

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateRotation()
{
// Create a new rotation.
   const char *name = fMatrixName->GetText();
   fSelectedMatrix = new TGeoRotation(name);
   fSelectedMatrix->SetBit(TGeoMatrix::kGeoRotation);
   fSelectedMatrix->RegisterYourself();
   ShowSelectMatrix();
   DoEditMatrix();
   fMatrixName->SetText(Form("matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
}   

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateVolume()
{
// Create a new volume.
   const char *name = fVolumeName->GetText();
   if (!fSelectedShape2 || !fSelectedMedium2) return;
   fSelectedVolume = new TGeoVolume(name, fSelectedShape2, fSelectedMedium2);
   fLSelVolume->SetText(name);
   ShowSelectVolume();
   DoEditVolume();
   fVolumeName->SetText(Form("volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
}   

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateAssembly()
{
// Create a new volume assembly.
   const char *name = fVolumeName->GetText();
   fSelectedVolume = new TGeoVolumeAssembly(name);
   fLSelVolume->SetText(name);
   ShowSelectVolume();
   DoEditVolume();
   fVolumeName->SetText(Form("volume%i", fGeometry->GetListOfVolumes()->GetEntries()));
}   

//______________________________________________________________________________
void TGeoManagerEditor::DoCreateCombi()
{
// Create a new translation + rotation.
   const char *name = fMatrixName->GetText();
   fSelectedMatrix = new TGeoCombiTrans(name, 0., 0., 0., new TGeoRotation());
   fSelectedMatrix->RegisterYourself();
   fSelectedMatrix->SetBit(TGeoMatrix::kGeoTranslation);
   fSelectedMatrix->SetBit(TGeoMatrix::kGeoRotation);
   ShowSelectMatrix();
   DoEditMatrix();
   fMatrixName->SetText(Form("matrix%i", fGeometry->GetListOfMatrices()->GetEntries()));
}   

//______________________________________________________________________________
void TGeoManagerEditor::DoSetTopVolume()
{
// Set top volume for the geometry.
   if (!fSelectedVolume) return;
   fGeometry->SetTopVolume(fSelectedVolume);
   fSetTopVolume->SetEnabled(kFALSE);
}      

//______________________________________________________________________________
void TGeoManagerEditor::DoEditShape()
{
// Slot for editing selected shape.
   if (!fSelectedShape) return;
   fTabMgr->GetShapeEditor(fSelectedShape);
   fSelectedShape->Draw();
   fTabMgr->GetPad()->GetView()->ShowAxis();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoEditVolume()
{
// Slot for editing selected volume.
   if (!fSelectedVolume) {
      fTabMgr->SetVolTabEnabled(kFALSE);
      return;
   }   
   fTabMgr->SetVolTabEnabled();
   fTabMgr->SetTab();
   fTabMgr->GetVolumeEditor(fSelectedVolume);
   fSelectedVolume->Draw();
}

//______________________________________________________________________________
void TGeoManagerEditor::DoEditMedium()
{
// Slot for editing selected medium.
   if (!fSelectedMedium) return;
   fTabMgr->GetMediumEditor(fSelectedMedium);
}

//______________________________________________________________________________
void TGeoManagerEditor::DoEditMaterial()
{
// Slot for editing selected material.
   if (!fSelectedMaterial) return;
   fTabMgr->GetMaterialEditor(fSelectedMaterial);
} 

//______________________________________________________________________________
void TGeoManagerEditor::DoEditMatrix()
{
// Slot for editing selected matrix.
   if (!fSelectedMatrix) return;
   fTabMgr->GetMatrixEditor(fSelectedMatrix);
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectMatrix()
{
// Slot for selecting an existing matrix.
   TGeoMatrix *matrix = fSelectedMatrix;
   new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);  
   fSelectedMatrix = (TGeoMatrix*)TGeoMatrixDialog::GetSelected();
   if (fSelectedMatrix) fLSelMatrix->SetText(fSelectedMatrix->GetName());
   else fSelectedMatrix = matrix;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectShape()
{
// Slot for selecting an existing shape.
   TGeoShape *shape = fSelectedShape;
   new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);  
   fSelectedShape = (TGeoShape*)TGeoShapeDialog::GetSelected();
   if (fSelectedShape) fLSelShape->SetText(fSelectedShape->GetName());
   else fSelectedShape = shape;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectShape2()
{
// Slot for selecting a shape for making a volume.
   TGeoShape *shape = fSelectedShape2;
   new TGeoShapeDialog(fBSelShape2, gClient->GetRoot(), 200,300);  
   fSelectedShape2 = (TGeoShape*)TGeoShapeDialog::GetSelected();
   if (fSelectedShape2) fLSelShape2->SetText(fSelectedShape2->GetName());
   else fSelectedShape2 = shape;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectMaterial()
{
// Slot for selecting an existing material.
   TGeoMaterial *mat = fSelectedMaterial;
   new TGeoMaterialDialog(fBSelMaterial, gClient->GetRoot(), 200,300);  
   fSelectedMaterial = (TGeoMaterial*)TGeoMaterialDialog::GetSelected();
   if (fSelectedMaterial) fLSelMaterial->SetText(fSelectedMaterial->GetName());
   else fSelectedMaterial = mat;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectMaterial2()
{
// Slot for selecting an existing material and making a medium.
   TGeoMaterial *mat = fSelectedMaterial2;
   new TGeoMaterialDialog(fBSelMaterial2, gClient->GetRoot(), 200,300);  
   fSelectedMaterial2 = (TGeoMaterial*)TGeoMaterialDialog::GetSelected();
   if (fSelectedMaterial2) fLSelMaterial2->SetText(fSelectedMaterial2->GetName());
   else fSelectedMaterial2 = mat;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectMedium()
{
// Slot for selecting an existing medium.
   TGeoMedium *med = fSelectedMedium;
   new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);  
   fSelectedMedium = (TGeoMedium*)TGeoMediumDialog::GetSelected();
   if (fSelectedMedium) fLSelMedium->SetText(fSelectedMedium->GetName());
   else fSelectedMedium = med;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectMedium2()
{
// Slot for selecting an existing medium for making a volume.
   TGeoMedium *med = fSelectedMedium2;
   new TGeoMediumDialog(fBSelMedium2, gClient->GetRoot(), 200,300);  
   fSelectedMedium2 = (TGeoMedium*)TGeoMediumDialog::GetSelected();
   if (fSelectedMedium2) fLSelMedium2->SetText(fSelectedMedium2->GetName());
   else fSelectedMedium2 = med;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectVolume()
{
// Slot for selecting an existing volume.
   TGeoVolume *vol = fSelectedVolume;
   new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);  
   fSelectedVolume = (TGeoVolume*)TGeoVolumeDialog::GetSelected();
   if (fSelectedVolume) fLSelVolume->SetText(fSelectedVolume->GetName());
   else fSelectedVolume = vol;
}

//______________________________________________________________________________
void TGeoManagerEditor::DoSelectTopVolume()
{
// Slot for seting top geometry volume.
   TGeoVolume *vol = fGeometry->GetTopVolume();
   new TGeoVolumeDialog(fBSelTop, gClient->GetRoot(), 200,300);  
   fSelectedVolume = (TGeoVolume*)TGeoVolumeDialog::GetSelected();
   if (fSelectedVolume) fLSelTop->SetText(fSelectedVolume->GetName());
   else fSelectedVolume = vol;
   if (fSelectedVolume && (fSelectedVolume != vol)) fGeometry->SetTopVolume(fSelectedVolume);
}

//______________________________________________________________________________
void TGeoManagerEditor::DoCloseGeometry()
{
// Slot for closing the geometry.
   if (!fGeometry->IsClosed()) fGeometry->CloseGeometry();
   fCloseGeometry->SetEnabled(kFALSE);
}
   
//______________________________________________________________________________
void TGeoManagerEditor::ShowSelectShape(Bool_t show)
{
// Show/hide interface for shape selection.
   TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem("Shapes")->GetContainer();
   if (show) cont->ShowFrame(f2);
   else      cont->HideFrame(f2);
}
   
//______________________________________________________________________________
void TGeoManagerEditor::ShowSelectVolume(Bool_t show)
{
// Show/hide interface for volume selection.
   TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem("General")->GetContainer();
   if (show) cont->ShowFrame(f7);
   else      cont->HideFrame(f7);
   cont = (TGCompositeFrame*)fCategories->GetItem("Volumes")->GetContainer();
   if (show) cont->ShowFrame(f3);
   else      cont->HideFrame(f3);
}
   
//______________________________________________________________________________
void TGeoManagerEditor::ShowSelectMaterial(Bool_t show)
{
// Show/hide interface for material selection.
   TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem("Materials")->GetContainer();
   if (show) cont->ShowFrame(f4);
   else      cont->HideFrame(f4);
}
   
//______________________________________________________________________________
void TGeoManagerEditor::ShowSelectMedium(Bool_t show)
{
// Show/hide interface for medium selection.
   TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem("Media")->GetContainer();
   if (show) cont->ShowFrame(f5);
   else      cont->HideFrame(f5);
}
   
//______________________________________________________________________________
void TGeoManagerEditor::ShowSelectMatrix(Bool_t show)
{
// Show/hide interface for matrix selection.
   TGCompositeFrame *cont = (TGCompositeFrame*)fCategories->GetItem("Matrices")->GetContainer();
   if (show) cont->ShowFrame(f6);
   else      cont->HideFrame(f6);
}
 TGeoManagerEditor.cxx:1
 TGeoManagerEditor.cxx:2
 TGeoManagerEditor.cxx:3
 TGeoManagerEditor.cxx:4
 TGeoManagerEditor.cxx:5
 TGeoManagerEditor.cxx:6
 TGeoManagerEditor.cxx:7
 TGeoManagerEditor.cxx:8
 TGeoManagerEditor.cxx:9
 TGeoManagerEditor.cxx:10
 TGeoManagerEditor.cxx:11
 TGeoManagerEditor.cxx:12
 TGeoManagerEditor.cxx:13
 TGeoManagerEditor.cxx:14
 TGeoManagerEditor.cxx:15
 TGeoManagerEditor.cxx:16
 TGeoManagerEditor.cxx:17
 TGeoManagerEditor.cxx:18
 TGeoManagerEditor.cxx:19
 TGeoManagerEditor.cxx:20
 TGeoManagerEditor.cxx:21
 TGeoManagerEditor.cxx:22
 TGeoManagerEditor.cxx:23
 TGeoManagerEditor.cxx:24
 TGeoManagerEditor.cxx:25
 TGeoManagerEditor.cxx:26
 TGeoManagerEditor.cxx:27
 TGeoManagerEditor.cxx:28
 TGeoManagerEditor.cxx:29
 TGeoManagerEditor.cxx:30
 TGeoManagerEditor.cxx:31
 TGeoManagerEditor.cxx:32
 TGeoManagerEditor.cxx:33
 TGeoManagerEditor.cxx:34
 TGeoManagerEditor.cxx:35
 TGeoManagerEditor.cxx:36
 TGeoManagerEditor.cxx:37
 TGeoManagerEditor.cxx:38
 TGeoManagerEditor.cxx:39
 TGeoManagerEditor.cxx:40
 TGeoManagerEditor.cxx:41
 TGeoManagerEditor.cxx:42
 TGeoManagerEditor.cxx:43
 TGeoManagerEditor.cxx:44
 TGeoManagerEditor.cxx:45
 TGeoManagerEditor.cxx:46
 TGeoManagerEditor.cxx:47
 TGeoManagerEditor.cxx:48
 TGeoManagerEditor.cxx:49
 TGeoManagerEditor.cxx:50
 TGeoManagerEditor.cxx:51
 TGeoManagerEditor.cxx:52
 TGeoManagerEditor.cxx:53
 TGeoManagerEditor.cxx:54
 TGeoManagerEditor.cxx:55
 TGeoManagerEditor.cxx:56
 TGeoManagerEditor.cxx:57
 TGeoManagerEditor.cxx:58
 TGeoManagerEditor.cxx:59
 TGeoManagerEditor.cxx:60
 TGeoManagerEditor.cxx:61
 TGeoManagerEditor.cxx:62
 TGeoManagerEditor.cxx:63
 TGeoManagerEditor.cxx:64
 TGeoManagerEditor.cxx:65
 TGeoManagerEditor.cxx:66
 TGeoManagerEditor.cxx:67
 TGeoManagerEditor.cxx:68
 TGeoManagerEditor.cxx:69
 TGeoManagerEditor.cxx:70
 TGeoManagerEditor.cxx:71
 TGeoManagerEditor.cxx:72
 TGeoManagerEditor.cxx:73
 TGeoManagerEditor.cxx:74
 TGeoManagerEditor.cxx:75
 TGeoManagerEditor.cxx:76
 TGeoManagerEditor.cxx:77
 TGeoManagerEditor.cxx:78
 TGeoManagerEditor.cxx:79
 TGeoManagerEditor.cxx:80
 TGeoManagerEditor.cxx:81
 TGeoManagerEditor.cxx:82
 TGeoManagerEditor.cxx:83
 TGeoManagerEditor.cxx:84
 TGeoManagerEditor.cxx:85
 TGeoManagerEditor.cxx:86
 TGeoManagerEditor.cxx:87
 TGeoManagerEditor.cxx:88
 TGeoManagerEditor.cxx:89
 TGeoManagerEditor.cxx:90
 TGeoManagerEditor.cxx:91
 TGeoManagerEditor.cxx:92
 TGeoManagerEditor.cxx:93
 TGeoManagerEditor.cxx:94
 TGeoManagerEditor.cxx:95
 TGeoManagerEditor.cxx:96
 TGeoManagerEditor.cxx:97
 TGeoManagerEditor.cxx:98
 TGeoManagerEditor.cxx:99
 TGeoManagerEditor.cxx:100
 TGeoManagerEditor.cxx:101
 TGeoManagerEditor.cxx:102
 TGeoManagerEditor.cxx:103
 TGeoManagerEditor.cxx:104
 TGeoManagerEditor.cxx:105
 TGeoManagerEditor.cxx:106
 TGeoManagerEditor.cxx:107
 TGeoManagerEditor.cxx:108
 TGeoManagerEditor.cxx:109
 TGeoManagerEditor.cxx:110
 TGeoManagerEditor.cxx:111
 TGeoManagerEditor.cxx:112
 TGeoManagerEditor.cxx:113
 TGeoManagerEditor.cxx:114
 TGeoManagerEditor.cxx:115
 TGeoManagerEditor.cxx:116
 TGeoManagerEditor.cxx:117
 TGeoManagerEditor.cxx:118
 TGeoManagerEditor.cxx:119
 TGeoManagerEditor.cxx:120
 TGeoManagerEditor.cxx:121
 TGeoManagerEditor.cxx:122
 TGeoManagerEditor.cxx:123
 TGeoManagerEditor.cxx:124
 TGeoManagerEditor.cxx:125
 TGeoManagerEditor.cxx:126
 TGeoManagerEditor.cxx:127
 TGeoManagerEditor.cxx:128
 TGeoManagerEditor.cxx:129
 TGeoManagerEditor.cxx:130
 TGeoManagerEditor.cxx:131
 TGeoManagerEditor.cxx:132
 TGeoManagerEditor.cxx:133
 TGeoManagerEditor.cxx:134
 TGeoManagerEditor.cxx:135
 TGeoManagerEditor.cxx:136
 TGeoManagerEditor.cxx:137
 TGeoManagerEditor.cxx:138
 TGeoManagerEditor.cxx:139
 TGeoManagerEditor.cxx:140
 TGeoManagerEditor.cxx:141
 TGeoManagerEditor.cxx:142
 TGeoManagerEditor.cxx:143
 TGeoManagerEditor.cxx:144
 TGeoManagerEditor.cxx:145
 TGeoManagerEditor.cxx:146
 TGeoManagerEditor.cxx:147
 TGeoManagerEditor.cxx:148
 TGeoManagerEditor.cxx:149
 TGeoManagerEditor.cxx:150
 TGeoManagerEditor.cxx:151
 TGeoManagerEditor.cxx:152
 TGeoManagerEditor.cxx:153
 TGeoManagerEditor.cxx:154
 TGeoManagerEditor.cxx:155
 TGeoManagerEditor.cxx:156
 TGeoManagerEditor.cxx:157
 TGeoManagerEditor.cxx:158
 TGeoManagerEditor.cxx:159
 TGeoManagerEditor.cxx:160
 TGeoManagerEditor.cxx:161
 TGeoManagerEditor.cxx:162
 TGeoManagerEditor.cxx:163
 TGeoManagerEditor.cxx:164
 TGeoManagerEditor.cxx:165
 TGeoManagerEditor.cxx:166
 TGeoManagerEditor.cxx:167
 TGeoManagerEditor.cxx:168
 TGeoManagerEditor.cxx:169
 TGeoManagerEditor.cxx:170
 TGeoManagerEditor.cxx:171
 TGeoManagerEditor.cxx:172
 TGeoManagerEditor.cxx:173
 TGeoManagerEditor.cxx:174
 TGeoManagerEditor.cxx:175
 TGeoManagerEditor.cxx:176
 TGeoManagerEditor.cxx:177
 TGeoManagerEditor.cxx:178
 TGeoManagerEditor.cxx:179
 TGeoManagerEditor.cxx:180
 TGeoManagerEditor.cxx:181
 TGeoManagerEditor.cxx:182
 TGeoManagerEditor.cxx:183
 TGeoManagerEditor.cxx:184
 TGeoManagerEditor.cxx:185
 TGeoManagerEditor.cxx:186
 TGeoManagerEditor.cxx:187
 TGeoManagerEditor.cxx:188
 TGeoManagerEditor.cxx:189
 TGeoManagerEditor.cxx:190
 TGeoManagerEditor.cxx:191
 TGeoManagerEditor.cxx:192
 TGeoManagerEditor.cxx:193
 TGeoManagerEditor.cxx:194
 TGeoManagerEditor.cxx:195
 TGeoManagerEditor.cxx:196
 TGeoManagerEditor.cxx:197
 TGeoManagerEditor.cxx:198
 TGeoManagerEditor.cxx:199
 TGeoManagerEditor.cxx:200
 TGeoManagerEditor.cxx:201
 TGeoManagerEditor.cxx:202
 TGeoManagerEditor.cxx:203
 TGeoManagerEditor.cxx:204
 TGeoManagerEditor.cxx:205
 TGeoManagerEditor.cxx:206
 TGeoManagerEditor.cxx:207
 TGeoManagerEditor.cxx:208
 TGeoManagerEditor.cxx:209
 TGeoManagerEditor.cxx:210
 TGeoManagerEditor.cxx:211
 TGeoManagerEditor.cxx:212
 TGeoManagerEditor.cxx:213
 TGeoManagerEditor.cxx:214
 TGeoManagerEditor.cxx:215
 TGeoManagerEditor.cxx:216
 TGeoManagerEditor.cxx:217
 TGeoManagerEditor.cxx:218
 TGeoManagerEditor.cxx:219
 TGeoManagerEditor.cxx:220
 TGeoManagerEditor.cxx:221
 TGeoManagerEditor.cxx:222
 TGeoManagerEditor.cxx:223
 TGeoManagerEditor.cxx:224
 TGeoManagerEditor.cxx:225
 TGeoManagerEditor.cxx:226
 TGeoManagerEditor.cxx:227
 TGeoManagerEditor.cxx:228
 TGeoManagerEditor.cxx:229
 TGeoManagerEditor.cxx:230
 TGeoManagerEditor.cxx:231
 TGeoManagerEditor.cxx:232
 TGeoManagerEditor.cxx:233
 TGeoManagerEditor.cxx:234
 TGeoManagerEditor.cxx:235
 TGeoManagerEditor.cxx:236
 TGeoManagerEditor.cxx:237
 TGeoManagerEditor.cxx:238
 TGeoManagerEditor.cxx:239
 TGeoManagerEditor.cxx:240
 TGeoManagerEditor.cxx:241
 TGeoManagerEditor.cxx:242
 TGeoManagerEditor.cxx:243
 TGeoManagerEditor.cxx:244
 TGeoManagerEditor.cxx:245
 TGeoManagerEditor.cxx:246
 TGeoManagerEditor.cxx:247
 TGeoManagerEditor.cxx:248
 TGeoManagerEditor.cxx:249
 TGeoManagerEditor.cxx:250
 TGeoManagerEditor.cxx:251
 TGeoManagerEditor.cxx:252
 TGeoManagerEditor.cxx:253
 TGeoManagerEditor.cxx:254
 TGeoManagerEditor.cxx:255
 TGeoManagerEditor.cxx:256
 TGeoManagerEditor.cxx:257
 TGeoManagerEditor.cxx:258
 TGeoManagerEditor.cxx:259
 TGeoManagerEditor.cxx:260
 TGeoManagerEditor.cxx:261
 TGeoManagerEditor.cxx:262
 TGeoManagerEditor.cxx:263
 TGeoManagerEditor.cxx:264
 TGeoManagerEditor.cxx:265
 TGeoManagerEditor.cxx:266
 TGeoManagerEditor.cxx:267
 TGeoManagerEditor.cxx:268
 TGeoManagerEditor.cxx:269
 TGeoManagerEditor.cxx:270
 TGeoManagerEditor.cxx:271
 TGeoManagerEditor.cxx:272
 TGeoManagerEditor.cxx:273
 TGeoManagerEditor.cxx:274
 TGeoManagerEditor.cxx:275
 TGeoManagerEditor.cxx:276
 TGeoManagerEditor.cxx:277
 TGeoManagerEditor.cxx:278
 TGeoManagerEditor.cxx:279
 TGeoManagerEditor.cxx:280
 TGeoManagerEditor.cxx:281
 TGeoManagerEditor.cxx:282
 TGeoManagerEditor.cxx:283
 TGeoManagerEditor.cxx:284
 TGeoManagerEditor.cxx:285
 TGeoManagerEditor.cxx:286
 TGeoManagerEditor.cxx:287
 TGeoManagerEditor.cxx:288
 TGeoManagerEditor.cxx:289
 TGeoManagerEditor.cxx:290
 TGeoManagerEditor.cxx:291
 TGeoManagerEditor.cxx:292
 TGeoManagerEditor.cxx:293
 TGeoManagerEditor.cxx:294
 TGeoManagerEditor.cxx:295
 TGeoManagerEditor.cxx:296
 TGeoManagerEditor.cxx:297
 TGeoManagerEditor.cxx:298
 TGeoManagerEditor.cxx:299
 TGeoManagerEditor.cxx:300
 TGeoManagerEditor.cxx:301
 TGeoManagerEditor.cxx:302
 TGeoManagerEditor.cxx:303
 TGeoManagerEditor.cxx:304
 TGeoManagerEditor.cxx:305
 TGeoManagerEditor.cxx:306
 TGeoManagerEditor.cxx:307
 TGeoManagerEditor.cxx:308
 TGeoManagerEditor.cxx:309
 TGeoManagerEditor.cxx:310
 TGeoManagerEditor.cxx:311
 TGeoManagerEditor.cxx:312
 TGeoManagerEditor.cxx:313
 TGeoManagerEditor.cxx:314
 TGeoManagerEditor.cxx:315
 TGeoManagerEditor.cxx:316
 TGeoManagerEditor.cxx:317
 TGeoManagerEditor.cxx:318
 TGeoManagerEditor.cxx:319
 TGeoManagerEditor.cxx:320
 TGeoManagerEditor.cxx:321
 TGeoManagerEditor.cxx:322
 TGeoManagerEditor.cxx:323
 TGeoManagerEditor.cxx:324
 TGeoManagerEditor.cxx:325
 TGeoManagerEditor.cxx:326
 TGeoManagerEditor.cxx:327
 TGeoManagerEditor.cxx:328
 TGeoManagerEditor.cxx:329
 TGeoManagerEditor.cxx:330
 TGeoManagerEditor.cxx:331
 TGeoManagerEditor.cxx:332
 TGeoManagerEditor.cxx:333
 TGeoManagerEditor.cxx:334
 TGeoManagerEditor.cxx:335
 TGeoManagerEditor.cxx:336
 TGeoManagerEditor.cxx:337
 TGeoManagerEditor.cxx:338
 TGeoManagerEditor.cxx:339
 TGeoManagerEditor.cxx:340
 TGeoManagerEditor.cxx:341
 TGeoManagerEditor.cxx:342
 TGeoManagerEditor.cxx:343
 TGeoManagerEditor.cxx:344
 TGeoManagerEditor.cxx:345
 TGeoManagerEditor.cxx:346
 TGeoManagerEditor.cxx:347
 TGeoManagerEditor.cxx:348
 TGeoManagerEditor.cxx:349
 TGeoManagerEditor.cxx:350
 TGeoManagerEditor.cxx:351
 TGeoManagerEditor.cxx:352
 TGeoManagerEditor.cxx:353
 TGeoManagerEditor.cxx:354
 TGeoManagerEditor.cxx:355
 TGeoManagerEditor.cxx:356
 TGeoManagerEditor.cxx:357
 TGeoManagerEditor.cxx:358
 TGeoManagerEditor.cxx:359
 TGeoManagerEditor.cxx:360
 TGeoManagerEditor.cxx:361
 TGeoManagerEditor.cxx:362
 TGeoManagerEditor.cxx:363
 TGeoManagerEditor.cxx:364
 TGeoManagerEditor.cxx:365
 TGeoManagerEditor.cxx:366
 TGeoManagerEditor.cxx:367
 TGeoManagerEditor.cxx:368
 TGeoManagerEditor.cxx:369
 TGeoManagerEditor.cxx:370
 TGeoManagerEditor.cxx:371
 TGeoManagerEditor.cxx:372
 TGeoManagerEditor.cxx:373
 TGeoManagerEditor.cxx:374
 TGeoManagerEditor.cxx:375
 TGeoManagerEditor.cxx:376
 TGeoManagerEditor.cxx:377
 TGeoManagerEditor.cxx:378
 TGeoManagerEditor.cxx:379
 TGeoManagerEditor.cxx:380
 TGeoManagerEditor.cxx:381
 TGeoManagerEditor.cxx:382
 TGeoManagerEditor.cxx:383
 TGeoManagerEditor.cxx:384
 TGeoManagerEditor.cxx:385
 TGeoManagerEditor.cxx:386
 TGeoManagerEditor.cxx:387
 TGeoManagerEditor.cxx:388
 TGeoManagerEditor.cxx:389
 TGeoManagerEditor.cxx:390
 TGeoManagerEditor.cxx:391
 TGeoManagerEditor.cxx:392
 TGeoManagerEditor.cxx:393
 TGeoManagerEditor.cxx:394
 TGeoManagerEditor.cxx:395
 TGeoManagerEditor.cxx:396
 TGeoManagerEditor.cxx:397
 TGeoManagerEditor.cxx:398
 TGeoManagerEditor.cxx:399
 TGeoManagerEditor.cxx:400
 TGeoManagerEditor.cxx:401
 TGeoManagerEditor.cxx:402
 TGeoManagerEditor.cxx:403
 TGeoManagerEditor.cxx:404
 TGeoManagerEditor.cxx:405
 TGeoManagerEditor.cxx:406
 TGeoManagerEditor.cxx:407
 TGeoManagerEditor.cxx:408
 TGeoManagerEditor.cxx:409
 TGeoManagerEditor.cxx:410
 TGeoManagerEditor.cxx:411
 TGeoManagerEditor.cxx:412
 TGeoManagerEditor.cxx:413
 TGeoManagerEditor.cxx:414
 TGeoManagerEditor.cxx:415
 TGeoManagerEditor.cxx:416
 TGeoManagerEditor.cxx:417
 TGeoManagerEditor.cxx:418
 TGeoManagerEditor.cxx:419
 TGeoManagerEditor.cxx:420
 TGeoManagerEditor.cxx:421
 TGeoManagerEditor.cxx:422
 TGeoManagerEditor.cxx:423
 TGeoManagerEditor.cxx:424
 TGeoManagerEditor.cxx:425
 TGeoManagerEditor.cxx:426
 TGeoManagerEditor.cxx:427
 TGeoManagerEditor.cxx:428
 TGeoManagerEditor.cxx:429
 TGeoManagerEditor.cxx:430
 TGeoManagerEditor.cxx:431
 TGeoManagerEditor.cxx:432
 TGeoManagerEditor.cxx:433
 TGeoManagerEditor.cxx:434
 TGeoManagerEditor.cxx:435
 TGeoManagerEditor.cxx:436
 TGeoManagerEditor.cxx:437
 TGeoManagerEditor.cxx:438
 TGeoManagerEditor.cxx:439
 TGeoManagerEditor.cxx:440
 TGeoManagerEditor.cxx:441
 TGeoManagerEditor.cxx:442
 TGeoManagerEditor.cxx:443
 TGeoManagerEditor.cxx:444
 TGeoManagerEditor.cxx:445
 TGeoManagerEditor.cxx:446
 TGeoManagerEditor.cxx:447
 TGeoManagerEditor.cxx:448
 TGeoManagerEditor.cxx:449
 TGeoManagerEditor.cxx:450
 TGeoManagerEditor.cxx:451
 TGeoManagerEditor.cxx:452
 TGeoManagerEditor.cxx:453
 TGeoManagerEditor.cxx:454
 TGeoManagerEditor.cxx:455
 TGeoManagerEditor.cxx:456
 TGeoManagerEditor.cxx:457
 TGeoManagerEditor.cxx:458
 TGeoManagerEditor.cxx:459
 TGeoManagerEditor.cxx:460
 TGeoManagerEditor.cxx:461
 TGeoManagerEditor.cxx:462
 TGeoManagerEditor.cxx:463
 TGeoManagerEditor.cxx:464
 TGeoManagerEditor.cxx:465
 TGeoManagerEditor.cxx:466
 TGeoManagerEditor.cxx:467
 TGeoManagerEditor.cxx:468
 TGeoManagerEditor.cxx:469
 TGeoManagerEditor.cxx:470
 TGeoManagerEditor.cxx:471
 TGeoManagerEditor.cxx:472
 TGeoManagerEditor.cxx:473
 TGeoManagerEditor.cxx:474
 TGeoManagerEditor.cxx:475
 TGeoManagerEditor.cxx:476
 TGeoManagerEditor.cxx:477
 TGeoManagerEditor.cxx:478
 TGeoManagerEditor.cxx:479
 TGeoManagerEditor.cxx:480
 TGeoManagerEditor.cxx:481
 TGeoManagerEditor.cxx:482
 TGeoManagerEditor.cxx:483
 TGeoManagerEditor.cxx:484
 TGeoManagerEditor.cxx:485
 TGeoManagerEditor.cxx:486
 TGeoManagerEditor.cxx:487
 TGeoManagerEditor.cxx:488
 TGeoManagerEditor.cxx:489
 TGeoManagerEditor.cxx:490
 TGeoManagerEditor.cxx:491
 TGeoManagerEditor.cxx:492
 TGeoManagerEditor.cxx:493
 TGeoManagerEditor.cxx:494
 TGeoManagerEditor.cxx:495
 TGeoManagerEditor.cxx:496
 TGeoManagerEditor.cxx:497
 TGeoManagerEditor.cxx:498
 TGeoManagerEditor.cxx:499
 TGeoManagerEditor.cxx:500
 TGeoManagerEditor.cxx:501
 TGeoManagerEditor.cxx:502
 TGeoManagerEditor.cxx:503
 TGeoManagerEditor.cxx:504
 TGeoManagerEditor.cxx:505
 TGeoManagerEditor.cxx:506
 TGeoManagerEditor.cxx:507
 TGeoManagerEditor.cxx:508
 TGeoManagerEditor.cxx:509
 TGeoManagerEditor.cxx:510
 TGeoManagerEditor.cxx:511
 TGeoManagerEditor.cxx:512
 TGeoManagerEditor.cxx:513
 TGeoManagerEditor.cxx:514
 TGeoManagerEditor.cxx:515
 TGeoManagerEditor.cxx:516
 TGeoManagerEditor.cxx:517
 TGeoManagerEditor.cxx:518
 TGeoManagerEditor.cxx:519
 TGeoManagerEditor.cxx:520
 TGeoManagerEditor.cxx:521
 TGeoManagerEditor.cxx:522
 TGeoManagerEditor.cxx:523
 TGeoManagerEditor.cxx:524
 TGeoManagerEditor.cxx:525
 TGeoManagerEditor.cxx:526
 TGeoManagerEditor.cxx:527
 TGeoManagerEditor.cxx:528
 TGeoManagerEditor.cxx:529
 TGeoManagerEditor.cxx:530
 TGeoManagerEditor.cxx:531
 TGeoManagerEditor.cxx:532
 TGeoManagerEditor.cxx:533
 TGeoManagerEditor.cxx:534
 TGeoManagerEditor.cxx:535
 TGeoManagerEditor.cxx:536
 TGeoManagerEditor.cxx:537
 TGeoManagerEditor.cxx:538
 TGeoManagerEditor.cxx:539
 TGeoManagerEditor.cxx:540
 TGeoManagerEditor.cxx:541
 TGeoManagerEditor.cxx:542
 TGeoManagerEditor.cxx:543
 TGeoManagerEditor.cxx:544
 TGeoManagerEditor.cxx:545
 TGeoManagerEditor.cxx:546
 TGeoManagerEditor.cxx:547
 TGeoManagerEditor.cxx:548
 TGeoManagerEditor.cxx:549
 TGeoManagerEditor.cxx:550
 TGeoManagerEditor.cxx:551
 TGeoManagerEditor.cxx:552
 TGeoManagerEditor.cxx:553
 TGeoManagerEditor.cxx:554
 TGeoManagerEditor.cxx:555
 TGeoManagerEditor.cxx:556
 TGeoManagerEditor.cxx:557
 TGeoManagerEditor.cxx:558
 TGeoManagerEditor.cxx:559
 TGeoManagerEditor.cxx:560
 TGeoManagerEditor.cxx:561
 TGeoManagerEditor.cxx:562
 TGeoManagerEditor.cxx:563
 TGeoManagerEditor.cxx:564
 TGeoManagerEditor.cxx:565
 TGeoManagerEditor.cxx:566
 TGeoManagerEditor.cxx:567
 TGeoManagerEditor.cxx:568
 TGeoManagerEditor.cxx:569
 TGeoManagerEditor.cxx:570
 TGeoManagerEditor.cxx:571
 TGeoManagerEditor.cxx:572
 TGeoManagerEditor.cxx:573
 TGeoManagerEditor.cxx:574
 TGeoManagerEditor.cxx:575
 TGeoManagerEditor.cxx:576
 TGeoManagerEditor.cxx:577
 TGeoManagerEditor.cxx:578
 TGeoManagerEditor.cxx:579
 TGeoManagerEditor.cxx:580
 TGeoManagerEditor.cxx:581
 TGeoManagerEditor.cxx:582
 TGeoManagerEditor.cxx:583
 TGeoManagerEditor.cxx:584
 TGeoManagerEditor.cxx:585
 TGeoManagerEditor.cxx:586
 TGeoManagerEditor.cxx:587
 TGeoManagerEditor.cxx:588
 TGeoManagerEditor.cxx:589
 TGeoManagerEditor.cxx:590
 TGeoManagerEditor.cxx:591
 TGeoManagerEditor.cxx:592
 TGeoManagerEditor.cxx:593
 TGeoManagerEditor.cxx:594
 TGeoManagerEditor.cxx:595
 TGeoManagerEditor.cxx:596
 TGeoManagerEditor.cxx:597
 TGeoManagerEditor.cxx:598
 TGeoManagerEditor.cxx:599
 TGeoManagerEditor.cxx:600
 TGeoManagerEditor.cxx:601
 TGeoManagerEditor.cxx:602
 TGeoManagerEditor.cxx:603
 TGeoManagerEditor.cxx:604
 TGeoManagerEditor.cxx:605
 TGeoManagerEditor.cxx:606
 TGeoManagerEditor.cxx:607
 TGeoManagerEditor.cxx:608
 TGeoManagerEditor.cxx:609
 TGeoManagerEditor.cxx:610
 TGeoManagerEditor.cxx:611
 TGeoManagerEditor.cxx:612
 TGeoManagerEditor.cxx:613
 TGeoManagerEditor.cxx:614
 TGeoManagerEditor.cxx:615
 TGeoManagerEditor.cxx:616
 TGeoManagerEditor.cxx:617
 TGeoManagerEditor.cxx:618
 TGeoManagerEditor.cxx:619
 TGeoManagerEditor.cxx:620
 TGeoManagerEditor.cxx:621
 TGeoManagerEditor.cxx:622
 TGeoManagerEditor.cxx:623
 TGeoManagerEditor.cxx:624
 TGeoManagerEditor.cxx:625
 TGeoManagerEditor.cxx:626
 TGeoManagerEditor.cxx:627
 TGeoManagerEditor.cxx:628
 TGeoManagerEditor.cxx:629
 TGeoManagerEditor.cxx:630
 TGeoManagerEditor.cxx:631
 TGeoManagerEditor.cxx:632
 TGeoManagerEditor.cxx:633
 TGeoManagerEditor.cxx:634
 TGeoManagerEditor.cxx:635
 TGeoManagerEditor.cxx:636
 TGeoManagerEditor.cxx:637
 TGeoManagerEditor.cxx:638
 TGeoManagerEditor.cxx:639
 TGeoManagerEditor.cxx:640
 TGeoManagerEditor.cxx:641
 TGeoManagerEditor.cxx:642
 TGeoManagerEditor.cxx:643
 TGeoManagerEditor.cxx:644
 TGeoManagerEditor.cxx:645
 TGeoManagerEditor.cxx:646
 TGeoManagerEditor.cxx:647
 TGeoManagerEditor.cxx:648
 TGeoManagerEditor.cxx:649
 TGeoManagerEditor.cxx:650
 TGeoManagerEditor.cxx:651
 TGeoManagerEditor.cxx:652
 TGeoManagerEditor.cxx:653
 TGeoManagerEditor.cxx:654
 TGeoManagerEditor.cxx:655
 TGeoManagerEditor.cxx:656
 TGeoManagerEditor.cxx:657
 TGeoManagerEditor.cxx:658
 TGeoManagerEditor.cxx:659
 TGeoManagerEditor.cxx:660
 TGeoManagerEditor.cxx:661
 TGeoManagerEditor.cxx:662
 TGeoManagerEditor.cxx:663
 TGeoManagerEditor.cxx:664
 TGeoManagerEditor.cxx:665
 TGeoManagerEditor.cxx:666
 TGeoManagerEditor.cxx:667
 TGeoManagerEditor.cxx:668
 TGeoManagerEditor.cxx:669
 TGeoManagerEditor.cxx:670
 TGeoManagerEditor.cxx:671
 TGeoManagerEditor.cxx:672
 TGeoManagerEditor.cxx:673
 TGeoManagerEditor.cxx:674
 TGeoManagerEditor.cxx:675
 TGeoManagerEditor.cxx:676
 TGeoManagerEditor.cxx:677
 TGeoManagerEditor.cxx:678
 TGeoManagerEditor.cxx:679
 TGeoManagerEditor.cxx:680
 TGeoManagerEditor.cxx:681
 TGeoManagerEditor.cxx:682
 TGeoManagerEditor.cxx:683
 TGeoManagerEditor.cxx:684
 TGeoManagerEditor.cxx:685
 TGeoManagerEditor.cxx:686
 TGeoManagerEditor.cxx:687
 TGeoManagerEditor.cxx:688
 TGeoManagerEditor.cxx:689
 TGeoManagerEditor.cxx:690
 TGeoManagerEditor.cxx:691
 TGeoManagerEditor.cxx:692
 TGeoManagerEditor.cxx:693
 TGeoManagerEditor.cxx:694
 TGeoManagerEditor.cxx:695
 TGeoManagerEditor.cxx:696
 TGeoManagerEditor.cxx:697
 TGeoManagerEditor.cxx:698
 TGeoManagerEditor.cxx:699
 TGeoManagerEditor.cxx:700
 TGeoManagerEditor.cxx:701
 TGeoManagerEditor.cxx:702
 TGeoManagerEditor.cxx:703
 TGeoManagerEditor.cxx:704
 TGeoManagerEditor.cxx:705
 TGeoManagerEditor.cxx:706
 TGeoManagerEditor.cxx:707
 TGeoManagerEditor.cxx:708
 TGeoManagerEditor.cxx:709
 TGeoManagerEditor.cxx:710
 TGeoManagerEditor.cxx:711
 TGeoManagerEditor.cxx:712
 TGeoManagerEditor.cxx:713
 TGeoManagerEditor.cxx:714
 TGeoManagerEditor.cxx:715
 TGeoManagerEditor.cxx:716
 TGeoManagerEditor.cxx:717
 TGeoManagerEditor.cxx:718
 TGeoManagerEditor.cxx:719
 TGeoManagerEditor.cxx:720
 TGeoManagerEditor.cxx:721
 TGeoManagerEditor.cxx:722
 TGeoManagerEditor.cxx:723
 TGeoManagerEditor.cxx:724
 TGeoManagerEditor.cxx:725
 TGeoManagerEditor.cxx:726
 TGeoManagerEditor.cxx:727
 TGeoManagerEditor.cxx:728
 TGeoManagerEditor.cxx:729
 TGeoManagerEditor.cxx:730
 TGeoManagerEditor.cxx:731
 TGeoManagerEditor.cxx:732
 TGeoManagerEditor.cxx:733
 TGeoManagerEditor.cxx:734
 TGeoManagerEditor.cxx:735
 TGeoManagerEditor.cxx:736
 TGeoManagerEditor.cxx:737
 TGeoManagerEditor.cxx:738
 TGeoManagerEditor.cxx:739
 TGeoManagerEditor.cxx:740
 TGeoManagerEditor.cxx:741
 TGeoManagerEditor.cxx:742
 TGeoManagerEditor.cxx:743
 TGeoManagerEditor.cxx:744
 TGeoManagerEditor.cxx:745
 TGeoManagerEditor.cxx:746
 TGeoManagerEditor.cxx:747
 TGeoManagerEditor.cxx:748
 TGeoManagerEditor.cxx:749
 TGeoManagerEditor.cxx:750
 TGeoManagerEditor.cxx:751
 TGeoManagerEditor.cxx:752
 TGeoManagerEditor.cxx:753
 TGeoManagerEditor.cxx:754
 TGeoManagerEditor.cxx:755
 TGeoManagerEditor.cxx:756
 TGeoManagerEditor.cxx:757
 TGeoManagerEditor.cxx:758
 TGeoManagerEditor.cxx:759
 TGeoManagerEditor.cxx:760
 TGeoManagerEditor.cxx:761
 TGeoManagerEditor.cxx:762
 TGeoManagerEditor.cxx:763
 TGeoManagerEditor.cxx:764
 TGeoManagerEditor.cxx:765
 TGeoManagerEditor.cxx:766
 TGeoManagerEditor.cxx:767
 TGeoManagerEditor.cxx:768
 TGeoManagerEditor.cxx:769
 TGeoManagerEditor.cxx:770
 TGeoManagerEditor.cxx:771
 TGeoManagerEditor.cxx:772
 TGeoManagerEditor.cxx:773
 TGeoManagerEditor.cxx:774
 TGeoManagerEditor.cxx:775
 TGeoManagerEditor.cxx:776
 TGeoManagerEditor.cxx:777
 TGeoManagerEditor.cxx:778
 TGeoManagerEditor.cxx:779
 TGeoManagerEditor.cxx:780
 TGeoManagerEditor.cxx:781
 TGeoManagerEditor.cxx:782
 TGeoManagerEditor.cxx:783
 TGeoManagerEditor.cxx:784
 TGeoManagerEditor.cxx:785
 TGeoManagerEditor.cxx:786
 TGeoManagerEditor.cxx:787
 TGeoManagerEditor.cxx:788
 TGeoManagerEditor.cxx:789
 TGeoManagerEditor.cxx:790
 TGeoManagerEditor.cxx:791
 TGeoManagerEditor.cxx:792
 TGeoManagerEditor.cxx:793
 TGeoManagerEditor.cxx:794
 TGeoManagerEditor.cxx:795
 TGeoManagerEditor.cxx:796
 TGeoManagerEditor.cxx:797
 TGeoManagerEditor.cxx:798
 TGeoManagerEditor.cxx:799
 TGeoManagerEditor.cxx:800
 TGeoManagerEditor.cxx:801
 TGeoManagerEditor.cxx:802
 TGeoManagerEditor.cxx:803
 TGeoManagerEditor.cxx:804
 TGeoManagerEditor.cxx:805
 TGeoManagerEditor.cxx:806
 TGeoManagerEditor.cxx:807
 TGeoManagerEditor.cxx:808
 TGeoManagerEditor.cxx:809
 TGeoManagerEditor.cxx:810
 TGeoManagerEditor.cxx:811
 TGeoManagerEditor.cxx:812
 TGeoManagerEditor.cxx:813
 TGeoManagerEditor.cxx:814
 TGeoManagerEditor.cxx:815
 TGeoManagerEditor.cxx:816
 TGeoManagerEditor.cxx:817
 TGeoManagerEditor.cxx:818
 TGeoManagerEditor.cxx:819
 TGeoManagerEditor.cxx:820
 TGeoManagerEditor.cxx:821
 TGeoManagerEditor.cxx:822
 TGeoManagerEditor.cxx:823
 TGeoManagerEditor.cxx:824
 TGeoManagerEditor.cxx:825
 TGeoManagerEditor.cxx:826
 TGeoManagerEditor.cxx:827
 TGeoManagerEditor.cxx:828
 TGeoManagerEditor.cxx:829
 TGeoManagerEditor.cxx:830
 TGeoManagerEditor.cxx:831
 TGeoManagerEditor.cxx:832
 TGeoManagerEditor.cxx:833
 TGeoManagerEditor.cxx:834
 TGeoManagerEditor.cxx:835
 TGeoManagerEditor.cxx:836
 TGeoManagerEditor.cxx:837
 TGeoManagerEditor.cxx:838
 TGeoManagerEditor.cxx:839
 TGeoManagerEditor.cxx:840
 TGeoManagerEditor.cxx:841
 TGeoManagerEditor.cxx:842
 TGeoManagerEditor.cxx:843
 TGeoManagerEditor.cxx:844
 TGeoManagerEditor.cxx:845
 TGeoManagerEditor.cxx:846
 TGeoManagerEditor.cxx:847
 TGeoManagerEditor.cxx:848
 TGeoManagerEditor.cxx:849
 TGeoManagerEditor.cxx:850
 TGeoManagerEditor.cxx:851
 TGeoManagerEditor.cxx:852
 TGeoManagerEditor.cxx:853
 TGeoManagerEditor.cxx:854
 TGeoManagerEditor.cxx:855
 TGeoManagerEditor.cxx:856
 TGeoManagerEditor.cxx:857
 TGeoManagerEditor.cxx:858
 TGeoManagerEditor.cxx:859
 TGeoManagerEditor.cxx:860
 TGeoManagerEditor.cxx:861
 TGeoManagerEditor.cxx:862
 TGeoManagerEditor.cxx:863
 TGeoManagerEditor.cxx:864
 TGeoManagerEditor.cxx:865
 TGeoManagerEditor.cxx:866
 TGeoManagerEditor.cxx:867
 TGeoManagerEditor.cxx:868
 TGeoManagerEditor.cxx:869
 TGeoManagerEditor.cxx:870
 TGeoManagerEditor.cxx:871
 TGeoManagerEditor.cxx:872
 TGeoManagerEditor.cxx:873
 TGeoManagerEditor.cxx:874
 TGeoManagerEditor.cxx:875
 TGeoManagerEditor.cxx:876
 TGeoManagerEditor.cxx:877
 TGeoManagerEditor.cxx:878
 TGeoManagerEditor.cxx:879
 TGeoManagerEditor.cxx:880
 TGeoManagerEditor.cxx:881
 TGeoManagerEditor.cxx:882
 TGeoManagerEditor.cxx:883
 TGeoManagerEditor.cxx:884
 TGeoManagerEditor.cxx:885
 TGeoManagerEditor.cxx:886
 TGeoManagerEditor.cxx:887
 TGeoManagerEditor.cxx:888
 TGeoManagerEditor.cxx:889
 TGeoManagerEditor.cxx:890
 TGeoManagerEditor.cxx:891
 TGeoManagerEditor.cxx:892
 TGeoManagerEditor.cxx:893
 TGeoManagerEditor.cxx:894
 TGeoManagerEditor.cxx:895
 TGeoManagerEditor.cxx:896
 TGeoManagerEditor.cxx:897
 TGeoManagerEditor.cxx:898
 TGeoManagerEditor.cxx:899
 TGeoManagerEditor.cxx:900
 TGeoManagerEditor.cxx:901
 TGeoManagerEditor.cxx:902
 TGeoManagerEditor.cxx:903
 TGeoManagerEditor.cxx:904
 TGeoManagerEditor.cxx:905
 TGeoManagerEditor.cxx:906
 TGeoManagerEditor.cxx:907
 TGeoManagerEditor.cxx:908
 TGeoManagerEditor.cxx:909
 TGeoManagerEditor.cxx:910
 TGeoManagerEditor.cxx:911
 TGeoManagerEditor.cxx:912
 TGeoManagerEditor.cxx:913
 TGeoManagerEditor.cxx:914
 TGeoManagerEditor.cxx:915
 TGeoManagerEditor.cxx:916
 TGeoManagerEditor.cxx:917
 TGeoManagerEditor.cxx:918
 TGeoManagerEditor.cxx:919
 TGeoManagerEditor.cxx:920
 TGeoManagerEditor.cxx:921
 TGeoManagerEditor.cxx:922
 TGeoManagerEditor.cxx:923
 TGeoManagerEditor.cxx:924
 TGeoManagerEditor.cxx:925
 TGeoManagerEditor.cxx:926
 TGeoManagerEditor.cxx:927
 TGeoManagerEditor.cxx:928
 TGeoManagerEditor.cxx:929
 TGeoManagerEditor.cxx:930
 TGeoManagerEditor.cxx:931
 TGeoManagerEditor.cxx:932
 TGeoManagerEditor.cxx:933
 TGeoManagerEditor.cxx:934
 TGeoManagerEditor.cxx:935
 TGeoManagerEditor.cxx:936
 TGeoManagerEditor.cxx:937
 TGeoManagerEditor.cxx:938
 TGeoManagerEditor.cxx:939
 TGeoManagerEditor.cxx:940
 TGeoManagerEditor.cxx:941
 TGeoManagerEditor.cxx:942
 TGeoManagerEditor.cxx:943
 TGeoManagerEditor.cxx:944
 TGeoManagerEditor.cxx:945
 TGeoManagerEditor.cxx:946
 TGeoManagerEditor.cxx:947
 TGeoManagerEditor.cxx:948
 TGeoManagerEditor.cxx:949
 TGeoManagerEditor.cxx:950
 TGeoManagerEditor.cxx:951
 TGeoManagerEditor.cxx:952
 TGeoManagerEditor.cxx:953
 TGeoManagerEditor.cxx:954
 TGeoManagerEditor.cxx:955
 TGeoManagerEditor.cxx:956
 TGeoManagerEditor.cxx:957
 TGeoManagerEditor.cxx:958
 TGeoManagerEditor.cxx:959
 TGeoManagerEditor.cxx:960
 TGeoManagerEditor.cxx:961
 TGeoManagerEditor.cxx:962
 TGeoManagerEditor.cxx:963
 TGeoManagerEditor.cxx:964
 TGeoManagerEditor.cxx:965
 TGeoManagerEditor.cxx:966
 TGeoManagerEditor.cxx:967
 TGeoManagerEditor.cxx:968
 TGeoManagerEditor.cxx:969
 TGeoManagerEditor.cxx:970
 TGeoManagerEditor.cxx:971
 TGeoManagerEditor.cxx:972
 TGeoManagerEditor.cxx:973
 TGeoManagerEditor.cxx:974
 TGeoManagerEditor.cxx:975
 TGeoManagerEditor.cxx:976
 TGeoManagerEditor.cxx:977
 TGeoManagerEditor.cxx:978
 TGeoManagerEditor.cxx:979
 TGeoManagerEditor.cxx:980
 TGeoManagerEditor.cxx:981
 TGeoManagerEditor.cxx:982
 TGeoManagerEditor.cxx:983
 TGeoManagerEditor.cxx:984
 TGeoManagerEditor.cxx:985
 TGeoManagerEditor.cxx:986
 TGeoManagerEditor.cxx:987
 TGeoManagerEditor.cxx:988
 TGeoManagerEditor.cxx:989
 TGeoManagerEditor.cxx:990
 TGeoManagerEditor.cxx:991
 TGeoManagerEditor.cxx:992
 TGeoManagerEditor.cxx:993
 TGeoManagerEditor.cxx:994
 TGeoManagerEditor.cxx:995
 TGeoManagerEditor.cxx:996
 TGeoManagerEditor.cxx:997
 TGeoManagerEditor.cxx:998
 TGeoManagerEditor.cxx:999
 TGeoManagerEditor.cxx:1000
 TGeoManagerEditor.cxx:1001
 TGeoManagerEditor.cxx:1002
 TGeoManagerEditor.cxx:1003
 TGeoManagerEditor.cxx:1004
 TGeoManagerEditor.cxx:1005
 TGeoManagerEditor.cxx:1006
 TGeoManagerEditor.cxx:1007
 TGeoManagerEditor.cxx:1008
 TGeoManagerEditor.cxx:1009
 TGeoManagerEditor.cxx:1010
 TGeoManagerEditor.cxx:1011
 TGeoManagerEditor.cxx:1012
 TGeoManagerEditor.cxx:1013
 TGeoManagerEditor.cxx:1014
 TGeoManagerEditor.cxx:1015
 TGeoManagerEditor.cxx:1016
 TGeoManagerEditor.cxx:1017
 TGeoManagerEditor.cxx:1018
 TGeoManagerEditor.cxx:1019
 TGeoManagerEditor.cxx:1020
 TGeoManagerEditor.cxx:1021
 TGeoManagerEditor.cxx:1022
 TGeoManagerEditor.cxx:1023
 TGeoManagerEditor.cxx:1024
 TGeoManagerEditor.cxx:1025
 TGeoManagerEditor.cxx:1026
 TGeoManagerEditor.cxx:1027
 TGeoManagerEditor.cxx:1028
 TGeoManagerEditor.cxx:1029
 TGeoManagerEditor.cxx:1030
 TGeoManagerEditor.cxx:1031
 TGeoManagerEditor.cxx:1032
 TGeoManagerEditor.cxx:1033
 TGeoManagerEditor.cxx:1034
 TGeoManagerEditor.cxx:1035
 TGeoManagerEditor.cxx:1036
 TGeoManagerEditor.cxx:1037
 TGeoManagerEditor.cxx:1038
 TGeoManagerEditor.cxx:1039
 TGeoManagerEditor.cxx:1040
 TGeoManagerEditor.cxx:1041
 TGeoManagerEditor.cxx:1042
 TGeoManagerEditor.cxx:1043
 TGeoManagerEditor.cxx:1044
 TGeoManagerEditor.cxx:1045
 TGeoManagerEditor.cxx:1046
 TGeoManagerEditor.cxx:1047
 TGeoManagerEditor.cxx:1048
 TGeoManagerEditor.cxx:1049
 TGeoManagerEditor.cxx:1050
 TGeoManagerEditor.cxx:1051
 TGeoManagerEditor.cxx:1052
 TGeoManagerEditor.cxx:1053
 TGeoManagerEditor.cxx:1054
 TGeoManagerEditor.cxx:1055
 TGeoManagerEditor.cxx:1056
 TGeoManagerEditor.cxx:1057
 TGeoManagerEditor.cxx:1058
 TGeoManagerEditor.cxx:1059
 TGeoManagerEditor.cxx:1060
 TGeoManagerEditor.cxx:1061
 TGeoManagerEditor.cxx:1062
 TGeoManagerEditor.cxx:1063
 TGeoManagerEditor.cxx:1064
 TGeoManagerEditor.cxx:1065
 TGeoManagerEditor.cxx:1066
 TGeoManagerEditor.cxx:1067
 TGeoManagerEditor.cxx:1068
 TGeoManagerEditor.cxx:1069
 TGeoManagerEditor.cxx:1070
 TGeoManagerEditor.cxx:1071
 TGeoManagerEditor.cxx:1072
 TGeoManagerEditor.cxx:1073
 TGeoManagerEditor.cxx:1074
 TGeoManagerEditor.cxx:1075
 TGeoManagerEditor.cxx:1076
 TGeoManagerEditor.cxx:1077
 TGeoManagerEditor.cxx:1078
 TGeoManagerEditor.cxx:1079
 TGeoManagerEditor.cxx:1080
 TGeoManagerEditor.cxx:1081
 TGeoManagerEditor.cxx:1082
 TGeoManagerEditor.cxx:1083
 TGeoManagerEditor.cxx:1084
 TGeoManagerEditor.cxx:1085
 TGeoManagerEditor.cxx:1086
 TGeoManagerEditor.cxx:1087
 TGeoManagerEditor.cxx:1088
 TGeoManagerEditor.cxx:1089
 TGeoManagerEditor.cxx:1090
 TGeoManagerEditor.cxx:1091
 TGeoManagerEditor.cxx:1092
 TGeoManagerEditor.cxx:1093
 TGeoManagerEditor.cxx:1094
 TGeoManagerEditor.cxx:1095
 TGeoManagerEditor.cxx:1096
 TGeoManagerEditor.cxx:1097
 TGeoManagerEditor.cxx:1098
 TGeoManagerEditor.cxx:1099
 TGeoManagerEditor.cxx:1100
 TGeoManagerEditor.cxx:1101
 TGeoManagerEditor.cxx:1102
 TGeoManagerEditor.cxx:1103
 TGeoManagerEditor.cxx:1104
 TGeoManagerEditor.cxx:1105
 TGeoManagerEditor.cxx:1106
 TGeoManagerEditor.cxx:1107
 TGeoManagerEditor.cxx:1108
 TGeoManagerEditor.cxx:1109
 TGeoManagerEditor.cxx:1110
 TGeoManagerEditor.cxx:1111
 TGeoManagerEditor.cxx:1112
 TGeoManagerEditor.cxx:1113
 TGeoManagerEditor.cxx:1114
 TGeoManagerEditor.cxx:1115
 TGeoManagerEditor.cxx:1116
 TGeoManagerEditor.cxx:1117
 TGeoManagerEditor.cxx:1118
 TGeoManagerEditor.cxx:1119
 TGeoManagerEditor.cxx:1120
 TGeoManagerEditor.cxx:1121
 TGeoManagerEditor.cxx:1122
 TGeoManagerEditor.cxx:1123
 TGeoManagerEditor.cxx:1124
 TGeoManagerEditor.cxx:1125
 TGeoManagerEditor.cxx:1126
 TGeoManagerEditor.cxx:1127
 TGeoManagerEditor.cxx:1128
 TGeoManagerEditor.cxx:1129
 TGeoManagerEditor.cxx:1130
 TGeoManagerEditor.cxx:1131
 TGeoManagerEditor.cxx:1132
 TGeoManagerEditor.cxx:1133
 TGeoManagerEditor.cxx:1134
 TGeoManagerEditor.cxx:1135
 TGeoManagerEditor.cxx:1136
 TGeoManagerEditor.cxx:1137
 TGeoManagerEditor.cxx:1138
 TGeoManagerEditor.cxx:1139
 TGeoManagerEditor.cxx:1140
 TGeoManagerEditor.cxx:1141
 TGeoManagerEditor.cxx:1142
 TGeoManagerEditor.cxx:1143
 TGeoManagerEditor.cxx:1144
 TGeoManagerEditor.cxx:1145
 TGeoManagerEditor.cxx:1146
 TGeoManagerEditor.cxx:1147
 TGeoManagerEditor.cxx:1148
 TGeoManagerEditor.cxx:1149
 TGeoManagerEditor.cxx:1150
 TGeoManagerEditor.cxx:1151
 TGeoManagerEditor.cxx:1152
 TGeoManagerEditor.cxx:1153
 TGeoManagerEditor.cxx:1154
 TGeoManagerEditor.cxx:1155
 TGeoManagerEditor.cxx:1156
 TGeoManagerEditor.cxx:1157
 TGeoManagerEditor.cxx:1158
 TGeoManagerEditor.cxx:1159
 TGeoManagerEditor.cxx:1160
 TGeoManagerEditor.cxx:1161
 TGeoManagerEditor.cxx:1162
 TGeoManagerEditor.cxx:1163
 TGeoManagerEditor.cxx:1164
 TGeoManagerEditor.cxx:1165
 TGeoManagerEditor.cxx:1166
 TGeoManagerEditor.cxx:1167
 TGeoManagerEditor.cxx:1168
 TGeoManagerEditor.cxx:1169
 TGeoManagerEditor.cxx:1170
 TGeoManagerEditor.cxx:1171
 TGeoManagerEditor.cxx:1172
 TGeoManagerEditor.cxx:1173
 TGeoManagerEditor.cxx:1174
 TGeoManagerEditor.cxx:1175
 TGeoManagerEditor.cxx:1176
 TGeoManagerEditor.cxx:1177
 TGeoManagerEditor.cxx:1178
 TGeoManagerEditor.cxx:1179
 TGeoManagerEditor.cxx:1180
 TGeoManagerEditor.cxx:1181
 TGeoManagerEditor.cxx:1182
 TGeoManagerEditor.cxx:1183
 TGeoManagerEditor.cxx:1184
 TGeoManagerEditor.cxx:1185
 TGeoManagerEditor.cxx:1186
 TGeoManagerEditor.cxx:1187
 TGeoManagerEditor.cxx:1188
 TGeoManagerEditor.cxx:1189
 TGeoManagerEditor.cxx:1190
 TGeoManagerEditor.cxx:1191
 TGeoManagerEditor.cxx:1192
 TGeoManagerEditor.cxx:1193
 TGeoManagerEditor.cxx:1194
 TGeoManagerEditor.cxx:1195
 TGeoManagerEditor.cxx:1196
 TGeoManagerEditor.cxx:1197
 TGeoManagerEditor.cxx:1198
 TGeoManagerEditor.cxx:1199
 TGeoManagerEditor.cxx:1200
 TGeoManagerEditor.cxx:1201
 TGeoManagerEditor.cxx:1202
 TGeoManagerEditor.cxx:1203
 TGeoManagerEditor.cxx:1204
 TGeoManagerEditor.cxx:1205
 TGeoManagerEditor.cxx:1206
 TGeoManagerEditor.cxx:1207
 TGeoManagerEditor.cxx:1208
 TGeoManagerEditor.cxx:1209
 TGeoManagerEditor.cxx:1210
 TGeoManagerEditor.cxx:1211
 TGeoManagerEditor.cxx:1212
 TGeoManagerEditor.cxx:1213
 TGeoManagerEditor.cxx:1214
 TGeoManagerEditor.cxx:1215
 TGeoManagerEditor.cxx:1216
 TGeoManagerEditor.cxx:1217
 TGeoManagerEditor.cxx:1218
 TGeoManagerEditor.cxx:1219
 TGeoManagerEditor.cxx:1220
 TGeoManagerEditor.cxx:1221
 TGeoManagerEditor.cxx:1222
 TGeoManagerEditor.cxx:1223
 TGeoManagerEditor.cxx:1224
 TGeoManagerEditor.cxx:1225
 TGeoManagerEditor.cxx:1226
 TGeoManagerEditor.cxx:1227
 TGeoManagerEditor.cxx:1228
 TGeoManagerEditor.cxx:1229
 TGeoManagerEditor.cxx:1230
 TGeoManagerEditor.cxx:1231
 TGeoManagerEditor.cxx:1232
 TGeoManagerEditor.cxx:1233
 TGeoManagerEditor.cxx:1234
 TGeoManagerEditor.cxx:1235
 TGeoManagerEditor.cxx:1236
 TGeoManagerEditor.cxx:1237
 TGeoManagerEditor.cxx:1238
 TGeoManagerEditor.cxx:1239
 TGeoManagerEditor.cxx:1240
 TGeoManagerEditor.cxx:1241
 TGeoManagerEditor.cxx:1242
 TGeoManagerEditor.cxx:1243
 TGeoManagerEditor.cxx:1244
 TGeoManagerEditor.cxx:1245
 TGeoManagerEditor.cxx:1246
 TGeoManagerEditor.cxx:1247
 TGeoManagerEditor.cxx:1248
 TGeoManagerEditor.cxx:1249
 TGeoManagerEditor.cxx:1250
 TGeoManagerEditor.cxx:1251
 TGeoManagerEditor.cxx:1252
 TGeoManagerEditor.cxx:1253
 TGeoManagerEditor.cxx:1254
 TGeoManagerEditor.cxx:1255
 TGeoManagerEditor.cxx:1256
 TGeoManagerEditor.cxx:1257
 TGeoManagerEditor.cxx:1258
 TGeoManagerEditor.cxx:1259
 TGeoManagerEditor.cxx:1260
 TGeoManagerEditor.cxx:1261
 TGeoManagerEditor.cxx:1262
 TGeoManagerEditor.cxx:1263
 TGeoManagerEditor.cxx:1264
 TGeoManagerEditor.cxx:1265
 TGeoManagerEditor.cxx:1266
 TGeoManagerEditor.cxx:1267
 TGeoManagerEditor.cxx:1268
 TGeoManagerEditor.cxx:1269
 TGeoManagerEditor.cxx:1270
 TGeoManagerEditor.cxx:1271
 TGeoManagerEditor.cxx:1272
 TGeoManagerEditor.cxx:1273
 TGeoManagerEditor.cxx:1274
 TGeoManagerEditor.cxx:1275
 TGeoManagerEditor.cxx:1276
 TGeoManagerEditor.cxx:1277
 TGeoManagerEditor.cxx:1278
 TGeoManagerEditor.cxx:1279
 TGeoManagerEditor.cxx:1280
 TGeoManagerEditor.cxx:1281
 TGeoManagerEditor.cxx:1282
 TGeoManagerEditor.cxx:1283
 TGeoManagerEditor.cxx:1284
 TGeoManagerEditor.cxx:1285
 TGeoManagerEditor.cxx:1286
 TGeoManagerEditor.cxx:1287
 TGeoManagerEditor.cxx:1288
 TGeoManagerEditor.cxx:1289
 TGeoManagerEditor.cxx:1290
 TGeoManagerEditor.cxx:1291
 TGeoManagerEditor.cxx:1292
 TGeoManagerEditor.cxx:1293
 TGeoManagerEditor.cxx:1294
 TGeoManagerEditor.cxx:1295
 TGeoManagerEditor.cxx:1296
 TGeoManagerEditor.cxx:1297
 TGeoManagerEditor.cxx:1298
 TGeoManagerEditor.cxx:1299
 TGeoManagerEditor.cxx:1300
 TGeoManagerEditor.cxx:1301
 TGeoManagerEditor.cxx:1302
 TGeoManagerEditor.cxx:1303
 TGeoManagerEditor.cxx:1304
 TGeoManagerEditor.cxx:1305
 TGeoManagerEditor.cxx:1306
 TGeoManagerEditor.cxx:1307
 TGeoManagerEditor.cxx:1308
 TGeoManagerEditor.cxx:1309
 TGeoManagerEditor.cxx:1310
 TGeoManagerEditor.cxx:1311
 TGeoManagerEditor.cxx:1312
 TGeoManagerEditor.cxx:1313
 TGeoManagerEditor.cxx:1314
 TGeoManagerEditor.cxx:1315
 TGeoManagerEditor.cxx:1316
 TGeoManagerEditor.cxx:1317
 TGeoManagerEditor.cxx:1318
 TGeoManagerEditor.cxx:1319
 TGeoManagerEditor.cxx:1320
 TGeoManagerEditor.cxx:1321
 TGeoManagerEditor.cxx:1322
 TGeoManagerEditor.cxx:1323
 TGeoManagerEditor.cxx:1324
 TGeoManagerEditor.cxx:1325
 TGeoManagerEditor.cxx:1326
 TGeoManagerEditor.cxx:1327
 TGeoManagerEditor.cxx:1328
 TGeoManagerEditor.cxx:1329
 TGeoManagerEditor.cxx:1330
 TGeoManagerEditor.cxx:1331
 TGeoManagerEditor.cxx:1332
 TGeoManagerEditor.cxx:1333
 TGeoManagerEditor.cxx:1334
 TGeoManagerEditor.cxx:1335
 TGeoManagerEditor.cxx:1336
 TGeoManagerEditor.cxx:1337
 TGeoManagerEditor.cxx:1338
 TGeoManagerEditor.cxx:1339
 TGeoManagerEditor.cxx:1340
 TGeoManagerEditor.cxx:1341
 TGeoManagerEditor.cxx:1342
 TGeoManagerEditor.cxx:1343
 TGeoManagerEditor.cxx:1344
 TGeoManagerEditor.cxx:1345
 TGeoManagerEditor.cxx:1346
 TGeoManagerEditor.cxx:1347
 TGeoManagerEditor.cxx:1348
 TGeoManagerEditor.cxx:1349
 TGeoManagerEditor.cxx:1350
 TGeoManagerEditor.cxx:1351
 TGeoManagerEditor.cxx:1352
 TGeoManagerEditor.cxx:1353
 TGeoManagerEditor.cxx:1354
 TGeoManagerEditor.cxx:1355
 TGeoManagerEditor.cxx:1356
 TGeoManagerEditor.cxx:1357
 TGeoManagerEditor.cxx:1358
 TGeoManagerEditor.cxx:1359
 TGeoManagerEditor.cxx:1360
 TGeoManagerEditor.cxx:1361
 TGeoManagerEditor.cxx:1362
 TGeoManagerEditor.cxx:1363
 TGeoManagerEditor.cxx:1364
 TGeoManagerEditor.cxx:1365
 TGeoManagerEditor.cxx:1366
 TGeoManagerEditor.cxx:1367
 TGeoManagerEditor.cxx:1368