CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/Fireworks/Core/interface/FWGeometryBrowser.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWGeometryBrowser_h
00002 #define Fireworks_Core_FWGeometryBrowser_h
00003 
00004 #ifndef __CINT__
00005 #include <boost/shared_ptr.hpp>
00006 #endif
00007 #include "TGFrame.h"
00008 
00009 #ifndef __CINT__
00010 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
00011 #include "Fireworks/Core/interface/FWStringParameter.h"
00012 #include "Fireworks/Core/interface/FWEnumParameter.h"
00013 #include "Fireworks/Core/interface/FWLongParameter.h"
00014 #include "Fireworks/Core/interface/FWParameterSetterBase.h"
00015 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
00016 #endif
00017 
00018 class TFile;
00019 class TGTextButton;
00020 class TGeoNode;
00021 class TGeoVolume;
00022 class TGTextEntry;
00023 class TGComboBox;
00024 class TGStatusBar;
00025 
00026 
00027 class FWGUIManager;
00028 class FWTableWidget;
00029 class FWGeometryTableManager;
00030 class FWConfiguration;
00031 
00032 class FWParameterBase;
00033 
00034 class FWGeometryBrowser : public TGMainFrame
00035 #ifndef __CINT__
00036                       , public FWConfigurableParameterizable , public FWParameterSetterEditorBase
00037 #endif
00038 {
00039    friend class FWGeometryTableManager;
00040 
00041 public:
00042    enum EMode { kNode, kVolume };
00043 
00044    FWGeometryBrowser(FWGUIManager*);
00045    virtual ~FWGeometryBrowser();
00046   
00047    void cellClicked(Int_t iRow, Int_t iColumn, 
00048                     Int_t iButton, Int_t iKeyMod, 
00049                     Int_t iGlobalX, Int_t iGlobalY);
00050   
00051    void newIndexSelected(int,int);
00052    void windowIsClosing();
00053 
00054    void browse();
00055    void readFile();
00056    void updateStatusBar(const char* status);
00057 
00058    virtual void setFrom(const FWConfiguration&);
00059    Bool_t HandleKey(Event_t *event);
00060    // ---------- const member functions --------------------- 
00061 
00062    virtual void addTo(FWConfiguration&) const;
00063    
00064 protected:
00065 #ifndef __CINT__
00066    FWEnumParameter         m_mode;
00067    FWStringParameter       m_filter; 
00068    FWLongParameter         m_autoExpand; 
00069    FWLongParameter         m_maxDaughters; 
00070 #endif
00071 
00072 private:
00073    FWGeometryBrowser(const FWGeometryBrowser&);
00074    const FWGeometryBrowser& operator=(const FWGeometryBrowser&);
00075 
00076    FWGUIManager           *m_guiManager;
00077 
00078    FWTableWidget          *m_tableWidget;
00079    FWGeometryTableManager *m_tableManager;
00080 
00081    TFile                  *m_geometryFile;
00082    TGTextButton           *m_fileOpen;
00083    TGStatusBar            *m_statBar;
00084    TGCompositeFrame       *m_settersFrame;
00085 
00086 #ifndef __CINT__
00087    std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
00088 #endif
00089    void resetSetters();
00090    void makeSetter(TGCompositeFrame* frame, FWParameterBase* param);
00091 
00092 
00093    ClassDef(FWGeometryBrowser, 0);
00094 };
00095 
00096 #endif
00097