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