Go to the documentation of this file.00001 #ifndef Fireworks_Core_FWGeometryTableViewBase_h
00002 #define Fireworks_Core_FWGeometryTableViewBase_h
00003
00004 #ifndef __CINT__
00005 #include <boost/shared_ptr.hpp>
00006 #endif
00007
00008
00009 #include "Rtypes.h"
00010 #include "TGFrame.h"
00011 #include "TGButton.h"
00012
00013 #include "Fireworks/Core/interface/FWViewType.h"
00014 #ifndef __CINT__
00015 #include "Fireworks/Core/interface/FWViewBase.h"
00016 #include "Fireworks/Core/interface/FWViewBase.h"
00017 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
00018 #include "Fireworks/Core/interface/FWStringParameter.h"
00019 #include "Fireworks/Core/interface/FWEnumParameter.h"
00020 #include "Fireworks/Core/interface/FWLongParameter.h"
00021 #include "Fireworks/Core/interface/FWParameterSetterBase.h"
00022 #include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
00023 #endif
00024
00025
00026
00027 class TGeoNode;
00028 class TGeoVolume;
00029 class TGStatusBar;
00030 class TGeoManager;
00031 class TEveWindowSlot;
00032 class TEveWindowFrame;
00033 class TEveElement;
00034 class TEvePointSet;
00035 class TEveScene;
00036
00037 class FWTableWidget;
00038 class FWGeometryTableManagerBase;
00039 class FWConfiguration;
00040 class FWColorPopup;
00041 class FWColorManager;
00042 class FWGeoTopNode;
00043 class FWParameterBase;
00044
00045
00046 class FWGeometryTableViewBase
00047 #ifndef __CINT__
00048 : public FWViewBase,
00049 public FWParameterSetterEditorBase
00050 #endif
00051 {
00052
00053 public:
00054 enum EMode { kNode, kVolume};
00055
00056 class FWViewCombo : public TGTextButton
00057 {
00058 private:
00059 FWGeometryTableViewBase* m_tableView;
00060 TEveElement* m_el;
00061 public:
00062 FWViewCombo(const TGWindow *p, FWGeometryTableViewBase* t):
00063 TGTextButton(p, "Select Views", -1, TGButton::GetDefaultGC()(), TGTextButton::GetDefaultFontStruct(), kRaisedFrame | kDoubleBorder ), m_tableView(t), m_el(0) {}
00064 virtual ~FWViewCombo() {}
00065 void setElement(TEveElement* x) {m_el = x;}
00066 virtual Bool_t HandleButton(Event_t* event);
00067 };
00068
00069
00070 FWGeometryTableViewBase(TEveWindowSlot*, FWViewType::EType, FWColorManager*);
00071 virtual ~FWGeometryTableViewBase();
00072
00073 virtual void cellClicked(Int_t iRow, Int_t iColumn,
00074 Int_t iButton, Int_t iKeyMod,
00075 Int_t iGlobalX, Int_t iGlobalY);
00076
00077
00078 void selectView(int);
00079
00080 bool getEnableHighlight() { return m_enableHighlight.value(); }
00081 virtual FWGeometryTableManagerBase* getTableManager() { return 0; }
00082 virtual void setFrom(const FWConfiguration&);
00083
00084
00085
00086 virtual void addTo(FWConfiguration&) const;
00087 virtual void saveImageTo( const std::string& iName ) const {}
00088 void nodeColorChangeRequested(Color_t);
00089
00090 void setBackgroundColor();
00091 void populate3DViewsFromConfig();
00092 virtual void refreshTable3D();
00093
00094
00095 void cdNode(int);
00096 virtual void cdTop();
00097 virtual void cdUp();
00098 virtual void setPath(int, std::string&);
00099
00100 void checkExpandLevel();
00101
00102 int getTopNodeIdx() const { return TMath::Max((int)m_topNodeIdx.value(), 0); }
00103
00104 protected:
00105
00106 #ifndef __CINT__
00107 FWLongParameter m_topNodeIdx;
00108 FWLongParameter m_autoExpand;
00109 FWBoolParameter m_enableHighlight;
00110 #endif
00111
00112 FWColorManager *m_colorManager;
00113 FWTableWidget *m_tableWidget;
00114
00115
00116
00117 FWColorPopup *m_colorPopup;
00118
00119 TEveWindowFrame* m_eveWindow;
00120 TGCompositeFrame* m_frame;
00121
00122 FWViewCombo* m_viewBox;
00123
00124
00125 const FWConfiguration* m_viewersConfig;
00126
00127
00128 bool m_enableRedraw;
00129
00130 TEvePointSet* m_marker;
00131 FWGeoTopNode* m_eveTopNode;
00132 TEveScene* m_eveScene;
00133
00134 #ifndef __CINT__
00135
00136 #endif
00137
00138
00139
00140 void enableHighlight();
00141
00142 void postConst();
00143
00144 private:
00145 int m_tableRowIndexForColorPopup;
00146
00147 FWGeometryTableViewBase(const FWGeometryTableViewBase&);
00148 const FWGeometryTableViewBase& operator=(const FWGeometryTableViewBase&);
00149 void setColumnSelected(int idx);
00150 ClassDef(FWGeometryTableViewBase, 0);
00151 };
00152
00153 #endif
00154