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 class TGeoNode;
00026 class TGeoVolume;
00027 class TGStatusBar;
00028 class TGeoManager;
00029 class TEveWindowSlot;
00030 class TEveWindowFrame;
00031 class TEveElement;
00032 class FWEveDigitSetScalableMarker;
00033 class TEveScene;
00034
00035 class FWTableWidget;
00036 class FWGeometryTableManagerBase;
00037 class FWConfiguration;
00038 class FWColorPopup;
00039 class FWColorManager;
00040 class FWGeoTopNode;
00041 class FWParameterBase;
00042
00043 class FWGeometryTableViewBase
00044 #ifndef __CINT__
00045 : public FWViewBase,
00046 public FWParameterSetterEditorBase
00047 #endif
00048 {
00049 public:
00050 class FWViewCombo : public TGTextButton
00051 {
00052 private:
00053 FWGeometryTableViewBase* m_tableView;
00054 TEveElement* m_el;
00055 public:
00056 FWViewCombo(const TGWindow *p, FWGeometryTableViewBase* t):
00057 TGTextButton(p, "Select Views", -1, TGButton::GetDefaultGC()(), TGTextButton::GetDefaultFontStruct(), kRaisedFrame | kDoubleBorder ), m_tableView(t), m_el(0) {}
00058 virtual ~FWViewCombo() {}
00059 void setElement(TEveElement* x) {m_el = x;}
00060 virtual Bool_t HandleButton(Event_t* event);
00061 };
00062
00063
00064 FWGeometryTableViewBase(TEveWindowSlot*, FWViewType::EType, FWColorManager*);
00065 virtual ~FWGeometryTableViewBase();
00066
00067 virtual void cellClicked(Int_t iRow, Int_t iColumn,
00068 Int_t iButton, Int_t iKeyMod,
00069 Int_t iGlobalX, Int_t iGlobalY);
00070
00071
00072 virtual void chosenItem(int);
00073 void selectView(int);
00074
00075 bool getEnableHighlight() { return m_enableHighlight.value(); }
00076 virtual FWGeometryTableManagerBase* getTableManager() { return 0; }
00077
00078
00079
00080 virtual void addTo(FWConfiguration&) const;
00081 virtual void saveImageTo( const std::string& iName ) const {}
00082 void nodeColorChangeRequested(Color_t);
00083
00084 void setBackgroundColor();
00085 void populate3DViewsFromConfig();
00086 virtual void refreshTable3D();
00087
00088
00089 void cdNode(int);
00090 virtual void cdTop();
00091 virtual void cdUp();
00092 virtual void setPath(int, std::string&);
00093
00094 void checkExpandLevel();
00095
00096 int getTopNodeIdx() const { return TMath::Max((int)m_topNodeIdx.value(), 0); }
00097
00098 FWEveDigitSetScalableMarker* getMarker() {return m_marker;}
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 bool m_enableRedraw;
00137
00138 FWEveDigitSetScalableMarker* m_marker;
00139 FWGeoTopNode* m_eveTopNode;
00140 TEveScene* m_eveScene;
00141
00142 #ifndef __CINT__
00143
00144 #endif
00145
00146
00147
00148 void postConst();
00149
00150 void setTopNodePathFromConfig(const FWConfiguration& iFrom);
00151
00152 virtual void populateController(ViewerParameterGUI&) const;
00153
00154 private:
00155 int m_tableRowIndexForColorPopup;
00156
00157 FWGeometryTableViewBase(const FWGeometryTableViewBase&);
00158 const FWGeometryTableViewBase& operator=(const FWGeometryTableViewBase&);
00159 void setColumnSelected(int idx);
00160 ClassDef(FWGeometryTableViewBase, 0);
00161 };
00162
00163 #endif
00164