TGeoManagerEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoManagerEditor.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: M.Gheata 
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGeoManagerEditor
00013 #define ROOT_TGeoManagerEditor
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 //  TGeoManagerEditor                                                   //
00018 //                                                                      //
00019 //  Editor for a TGeoManager.                                           //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TGButton
00024 #include "TGWidget.h"
00025 #endif
00026 #ifndef ROOT_TGeoGedFrame
00027 #include "TGeoGedFrame.h"
00028 #endif
00029 
00030 class TGeoManager;
00031 class TGeoVolume;
00032 class TGeoShape;
00033 class TGeoMedium;
00034 class TGeoMaterial;
00035 class TGeoMatrix;
00036 class TGShutter;
00037 class TGShutterItem;
00038 class TGTextEntry;
00039 class TGTab;
00040 class TGComboBox;
00041 class TGNumberEntry;
00042 class TGTextButton;
00043 class TGPictureButton;
00044 class TGCheckButton;
00045 class TGRadioButton;
00046 class TGeoTabManager;
00047 
00048 class TGeoManagerEditor : public TGedFrame {
00049 
00050 protected:
00051 
00052    TGeoManager         *fGeometry;          // Selected geometry manager
00053    TGeoTabManager      *fTabMgr;            // Tab manager
00054    TGTab               *fTab;               // TGTab of GedEditor
00055    TGCompositeFrame    *fVolumeTab;         // Tab of Volume tab
00056    Bool_t               fIsModified;        // Flag that manager was modified
00057    TGShutter           *fCategories;        // Categories shutter
00058    TGTextEntry         *fManagerName;       // Name text entry
00059    TGTextEntry         *fManagerTitle;      // Title text entry
00060    TGTextEntry         *fMediumName;        // Medium name text entry
00061    TGTextEntry         *fMatrixName;        // Matrix name text entry
00062    TGTextEntry         *fMaterialName;      // Material name text entry
00063    TGTextEntry         *fVolumeName;        // Volume name text entry
00064    TGeoMaterial        *fSelectedMaterial;   // Selected material
00065    TGeoMaterial        *fSelectedMaterial2;  // Selected material for medium creation
00066    TGLabel             *fLSelMaterial;      // Selected material label
00067    TGLabel             *fLSelMaterial2;      // Selected material label
00068    TGPictureButton     *fBSelMaterial;      // Button for selecting a material
00069    TGPictureButton     *fBSelMaterial2;      // Button for selecting a material
00070    TGeoVolume          *fSelectedVolume;    // Selected volume
00071    TGLabel             *fLSelVolume;        // Selected volume label
00072    TGPictureButton     *fBSelVolume;        // Button for selecting a volume
00073    TGeoShape           *fSelectedShape;     // Selected shape
00074    TGeoShape           *fSelectedShape2;    // Selected shape for volume creation
00075    TGLabel             *fLSelShape;         // Selected shape label
00076    TGLabel             *fLSelShape2;         // Selected shape label
00077    TGPictureButton     *fBSelShape;         // Button for selecting a shape
00078    TGPictureButton     *fBSelShape2;         // Button for selecting a shape
00079    TGeoMatrix          *fSelectedMatrix;    // Selected matrix
00080    TGLabel             *fLSelMatrix;        // Selected matrix label
00081    TGPictureButton     *fBSelMatrix;        // Button for selecting a matrix
00082    TGeoMedium          *fSelectedMedium;    // Selected medium
00083    TGeoMedium          *fSelectedMedium2;    // Selected medium for volume creation
00084    TGLabel             *fLSelMedium;        // Selected medium label
00085    TGLabel             *fLSelMedium2;        // Selected medium label
00086    TGPictureButton     *fBSelMedium;        // Button for selecting a medium
00087    TGPictureButton     *fBSelMedium2;       // Button for selecting a medium
00088    TGPictureButton     *fShapeButton[21];   // List of shape buttons
00089    TGPictureButton     *fMatrixButton[3];   // List of matrix buttons
00090    TGPictureButton     *fVolumeButton[2];   // List of volume buttons
00091    TGPictureButton     *fMaterialButton[2]; // List of material buttons
00092    TGRadioButton       *fExportOption[2];   // Export option buttons
00093    TGTextButton        *fExportButton;      // Button to export geometry
00094    TGComboBox          *fElementList;       // Combo box for elements
00095    TGNumberEntry       *fEntryDensity;      // Number entry for material density
00096    TGPictureButton     *fMediumButton;      // Button to create a medium
00097    TGNumberEntry       *fMediumId;          // Medium ID number entry
00098    TGTextButton        *fEditShape;         // Button for editing selected shape
00099    TGTextButton        *fEditMedium;        // Button for editing a medium
00100    TGTextButton        *fEditMaterial;      // Button for editing a material
00101    TGTextButton        *fEditMatrix;        // Button for editing a matrix
00102    TGTextButton        *fEditVolume;        // Button for editing a volume
00103    TGTextButton        *fSetTopVolume;      // Button for setting top volume
00104    TGLabel             *fLSelTop;           // Selected top volume
00105    TGPictureButton     *fBSelTop;           // Button for selecting top volume
00106    TGTextButton        *fCloseGeometry;     // Button for closing the geometry
00107    TGCompositeFrame    *f2;                 // Parent frame for shape editing
00108    TGCompositeFrame    *f3;                 // Parent frame for volume editing
00109    TGCompositeFrame    *f4;                 // Parent frame for materials editing
00110    TGCompositeFrame    *f5;                 // Parent frame for media editing
00111    TGCompositeFrame    *f6;                 // Parent frame for matrices editing
00112    TGCompositeFrame    *f7;                 // Parent frame for closing geometry
00113    TCanvas             *fConnectedCanvas;   // Canvas connected to SelectedSlot()
00114 
00115    virtual void ConnectSignals2Slots();     // Connect the signals to the slots
00116    void           ShowSelectShape(Bool_t show=kTRUE);
00117    void           ShowSelectVolume(Bool_t show=kTRUE);
00118    void           ShowSelectMaterial(Bool_t show=kTRUE);
00119    void           ShowSelectMedium(Bool_t show=kTRUE);
00120    void           ShowSelectMatrix(Bool_t show=kTRUE);
00121 
00122 public:
00123    TGeoManagerEditor(const TGWindow *p = 0,
00124                     Int_t width = 140, Int_t height = 30,
00125                     UInt_t options = kChildFrame,
00126                     Pixel_t back = GetDefaultFrameBackground());
00127    virtual ~TGeoManagerEditor();
00128    static void    LoadLib() {;}
00129    virtual void   SetModel(TObject *obj);
00130 
00131    virtual void   SelectedSlot(TVirtualPad* pad, TObject* obj, Int_t event);
00132    void           ConnectSelected(TCanvas *c);
00133    void           DisconnectSelected();
00134 
00135    void           DoName();
00136    void           DoCreateBox();
00137    void           DoCreatePara();
00138    void           DoCreateTrd1();
00139    void           DoCreateTrd2();
00140    void           DoCreateTrap();
00141    void           DoCreateGtra();
00142    void           DoCreateXtru();
00143    void           DoCreateArb8();
00144    void           DoCreateTube();
00145    void           DoCreateTubs();
00146    void           DoCreateCone();
00147    void           DoCreateCons();
00148    void           DoCreateSphe();
00149    void           DoCreateCtub();
00150    void           DoCreateEltu();
00151    void           DoCreateTorus();
00152    void           DoCreatePcon();
00153    void           DoCreatePgon();
00154    void           DoCreateHype();
00155    void           DoCreateParab();
00156    void           DoCreateComposite();
00157    void           DoCreateMaterial();
00158    void           DoCreateMixture();
00159    void           DoCreateMedium();
00160    void           DoCreateTranslation();
00161    void           DoCreateRotation();
00162    void           DoCreateCombi();
00163    void           DoCreateVolume();
00164    void           DoCreateAssembly();
00165    void           DoEditShape();
00166    void           DoEditVolume();
00167    void           DoEditMedium();
00168    void           DoEditMaterial();
00169    void           DoEditMatrix();
00170    void           DoSelectShape();
00171    void           DoSelectShape2();
00172    void           DoSelectVolume();
00173    void           DoSelectMatrix();
00174    void           DoSelectMaterial();
00175    void           DoSelectMaterial2();
00176    void           DoSelectMedium();
00177    void           DoSelectMedium2();
00178    void           DoSetTopVolume();
00179    void           DoSelectTopVolume();
00180    void           DoExportGeometry();
00181    void           DoCloseGeometry();
00182    
00183    ClassDef(TGeoManagerEditor,0)   // TGeoManager editor
00184 };   
00185   
00186 #endif                    

Generated on Tue Jul 5 14:13:00 2011 for ROOT_528-00b_version by  doxygen 1.5.1