CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Fireworks/Core/interface/FWGeometryTableView.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_FWGeometryTableView_h
00002 #define Fireworks_Core_FWGeometryTableView_h
00003 
00004 #ifndef __CINT__
00005 #include <boost/shared_ptr.hpp>
00006 #endif
00007 
00008 
00009 #include "Rtypes.h"
00010 #include "TGFrame.h"
00011 
00012 #ifndef __CINT__
00013 #include "Fireworks/Core/interface/FWViewBase.h"
00014 #include "Fireworks/Core/interface/FWViewBase.h"
00015 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
00016 #include "Fireworks/Core/interface/FWStringParameter.h"
00017 #include "Fireworks/Core/interface/FWEnumParameter.h"
00018 #include "Fireworks/Core/interface/FWLongParameter.h"
00019 #include "Fireworks/Core/interface/FWParameterSetterBase.h"
00020 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
00021 #endif
00022 
00023 
00024 class TGTextButton;
00025 class TGeoNode;
00026 class TGeoVolume;
00027 class TGTextEntry;
00028 class TGComboBox;
00029 class TGStatusBar;
00030 class TGeoManager;
00031 class TEveWindowSlot;
00032 class TEveWindowFrame;
00033 
00034 class FWTableWidget;
00035 class FWGeometryTableManager;
00036 class FWConfiguration;
00037 class FWColorPopup;
00038 class FWColorManager;
00039 class FWGeoTopNode;
00040 
00041 class FWParameterBase;
00042 class FWViewCombo;
00043 class FWGUIValidatingTextEntry;
00044 class FWGeoMaterialValidator;
00045 
00046 class FWGeometryTableView
00047 #ifndef __CINT__
00048    : public  FWViewBase,
00049      public  FWParameterSetterEditorBase
00050 #endif
00051 {
00052 
00053 public:
00054    enum EMode { kNode, kVolume };
00055 
00056    FWGeometryTableView(TEveWindowSlot*, FWColorManager*, TGeoNode*, TObjArray*);
00057    virtual ~FWGeometryTableView();
00058   
00059    void cellClicked(Int_t iRow, Int_t iColumn, 
00060                     Int_t iButton, Int_t iKeyMod, 
00061                     Int_t iGlobalX, Int_t iGlobalY);
00062   
00063    void chosenItem(int);
00064    void selectView(int);
00065    void filterListCallback();
00066    void filterTextEntryCallback();
00067    void updateFilter(std::string&);
00068 
00069    void printTable();
00070 
00071    void cdNode(int);
00072    void cdTop();
00073    void cdUp();
00074    void setPath(int, std::string&);
00075 
00076    bool getVolumeMode()      const { return m_mode.value(); }
00077    std::string getFilter ()  const { return m_filter.value(); }
00078    int getAutoExpand()       const { return m_autoExpand.value(); }
00079    int getVisLevel()         const  {return m_visLevel.value(); }
00080    bool getIgnoreVisLevelWhenFilter() const  {return m_visLevelFilter.value(); }
00081 
00082    int getTopNodeIdx() const { return m_topNodeIdx.value(); }
00083    FWGeometryTableManager*  getTableManager() { return m_tableManager;} 
00084    virtual void setFrom(const FWConfiguration&);
00085 
00086    // ---------- const member functions --------------------- 
00087 
00088    virtual void addTo(FWConfiguration&) const;
00089    virtual void saveImageTo( const std::string& iName ) const {}
00090    void nodeColorChangeRequested(Color_t);
00091 
00092    void setBackgroundColor();
00093    void populate3DViewsFromConfig();
00094 
00095 private:
00096    FWGeometryTableView(const FWGeometryTableView&);
00097    const FWGeometryTableView& operator=(const FWGeometryTableView&);
00098 
00099 
00100 #ifndef __CINT__ 
00101    FWEnumParameter         m_mode;
00102    FWStringParameter       m_filter; 
00103    FWLongParameter         m_autoExpand;
00104    FWLongParameter         m_visLevel;
00105    FWBoolParameter         m_visLevelFilter;      
00106    FWLongParameter         m_topNodeIdx;  
00107 #endif
00108 
00109    FWColorManager         *m_colorManager;
00110    FWTableWidget          *m_tableWidget;
00111    FWGeometryTableManager *m_tableManager;
00112 
00113    TGCompositeFrame       *m_settersFrame;
00114    FWGeoTopNode           *m_eveTopNode;
00115 
00116    FWColorPopup           *m_colorPopup;
00117 
00118    TEveWindowFrame*        m_eveWindow;
00119    TGCompositeFrame*       m_frame;
00120 
00121    FWViewCombo*            m_viewBox;
00122 
00123    FWGUIValidatingTextEntry* m_filterEntry;
00124    FWGeoMaterialValidator*   m_filterValidator;
00125 
00126    const FWConfiguration*  m_viewersConfig;
00127 
00128 #ifndef __CINT__
00129    std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
00130 #endif
00131    void resetSetters();
00132    void makeSetter(TGCompositeFrame* frame, FWParameterBase* param);
00133    void loadGeometry();
00134 
00135    void autoExpandChanged();
00136    void modeChanged();
00137    void refreshTable3D();
00138 
00139    ClassDef(FWGeometryTableView, 0);
00140 };
00141 
00142 #endif
00143