CMS 3D CMS Logo

FWGeometryTableViewBase.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWGeometryTableViewBase_h
2 #define Fireworks_Core_FWGeometryTableViewBase_h
3 
4 #ifndef __CINT__
5 #include <memory>
6 #endif
7 
8 
9 #include "Rtypes.h"
10 #include "TGFrame.h"
11 #include "TGButton.h"
13 #ifndef __CINT__
22 #endif
23 
24 
25 class TGeoNode;
26 class TGeoVolume;
27 class TGStatusBar;
28 class TGeoManager;
29 class TEveWindowSlot;
30 class TEveWindowFrame;
31 class TEveElement;
33 class TEveScene;
34 
35 class FWTableWidget;
37 class FWConfiguration;
38 class FWColorPopup;
39 class FWColorManager;
40 class FWGeoTopNode;
41 class FWParameterBase;
42 
44 #ifndef __CINT__
45  : public FWViewBase,
47 #endif
48 {
49 public:
50  class FWViewCombo : public TGTextButton
51  {
52  private:
54  TEveElement* m_el;
55  public:
56  FWViewCombo(const TGWindow *p, FWGeometryTableViewBase* t):
57  TGTextButton(p, "Select Views", -1, TGButton::GetDefaultGC()(), TGTextButton::GetDefaultFontStruct(), kRaisedFrame | kDoubleBorder ), m_tableView(t), m_el(nullptr) {}
58  ~FWViewCombo() override {}
59  void setElement(TEveElement* x) {m_el = x;}
60  Bool_t HandleButton(Event_t* event) override;
61  };
62 
63 
65  ~FWGeometryTableViewBase() override;
66 
67  virtual void cellClicked(Int_t iRow, Int_t iColumn,
68  Int_t iButton, Int_t iKeyMod,
69  Int_t iGlobalX, Int_t iGlobalY);
70 
71  // void chosenItemFrom3DView(int);
72  virtual void chosenItem(int);
73  void selectView(int);
74 
76  virtual FWGeometryTableManagerBase* getTableManager() { return nullptr; }
77 
78  // ---------- const member functions ---------------------
79 
80  void addTo(FWConfiguration&) const override;
81  void saveImageTo( const std::string& iName ) const override {}
82  void nodeColorChangeRequested(Color_t);
83 
84  void setBackgroundColor();
86  virtual void refreshTable3D();
87 
88 
89  void cdNode(int);
90  virtual void cdTop();
91  virtual void cdUp();
92  virtual void setPath(int, std::string&);
93 
94  void checkExpandLevel();
95 
96  int getTopNodeIdx() const { return TMath::Max((int)m_topNodeIdx.value(), 0); }
97 
99  void transparencyChanged();
100 
101  void reloadColors();
102 
107 
108 protected:
109 
110 #ifndef __CINT__
114 
119 #endif
120 
123 
124  // TGCompositeFrame *m_settersFrame;
125 
127 
128  TEveWindowFrame* m_eveWindow;
129  TGCompositeFrame* m_frame;
130 
132 
133 
135 
137 
140  TEveScene* m_eveScene;
141 
142 #ifndef __CINT__
143  // std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
144 #endif
145  // void resetSetters();
146  // void makeSetter(TGCompositeFrame* frame, FWParameterBase* param);
147 
148  void postConst();
149 
150  void setTopNodePathFromConfig(const FWConfiguration& iFrom);
151 
152  void populateController(ViewerParameterGUI&) const override;
153 
154 private:
156 
157  FWGeometryTableViewBase(const FWGeometryTableViewBase&); // stop default
158  const FWGeometryTableViewBase& operator=(const FWGeometryTableViewBase&); // stop default
159  void setColumnSelected(int idx);
161 };
162 
163 #endif
164 
virtual void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
Bool_t HandleButton(Event_t *event) override
FWEveDigitSetScalableMarker * m_marker
FWLongParameter m_parentTransparencyFactor
void saveImageTo(const std::string &iName) const override
void populateController(ViewerParameterGUI &) const override
void setTopNodePathFromConfig(const FWConfiguration &iFrom)
const FWConfiguration * m_viewersConfig
FWLongParameter m_leafTransparencyFactor
ClassDef(FWGeometryTableViewBase, 0)
FWEveDigitSetScalableMarker * getMarker()
#define nullptr
virtual void setPath(int, std::string &)
void addTo(FWConfiguration &) const override
FWGeometryTableViewBase(TEveWindowSlot *, FWViewType::EType, FWColorManager *)
const FWGeometryTableViewBase & operator=(const FWGeometryTableViewBase &)
T Max(T a, T b)
Definition: MathUtil.h:44
FWViewCombo(const TGWindow *p, FWGeometryTableViewBase *t)
Definition: event.py:1
virtual FWGeometryTableManagerBase * getTableManager()