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 #include "Rtypes.h"
9 #include "TGFrame.h"
10 #include "TGButton.h"
12 #ifndef __CINT__
21 #endif
22 
23 class TGeoNode;
24 class TGeoVolume;
25 class TGStatusBar;
26 class TGeoManager;
27 class TEveWindowSlot;
28 class TEveWindowFrame;
29 class TEveElement;
31 class TEveScene;
32 
33 class FWTableWidget;
35 class FWConfiguration;
36 class FWColorPopup;
37 class FWColorManager;
38 class FWGeoTopNode;
39 class FWParameterBase;
40 
42 #ifndef __CINT__
43  : public FWViewBase,
45 #endif
46 {
47 public:
48  class FWViewCombo : public TGTextButton {
49  private:
51  TEveElement* m_el;
52 
53  public:
55  : TGTextButton(p,
56  "Select Views",
57  -1,
58  TGButton::GetDefaultGC()(),
59  TGTextButton::GetDefaultFontStruct(),
60  kRaisedFrame | kDoubleBorder),
61  m_tableView(t),
62  m_el(nullptr) {}
63  ~FWViewCombo() override {}
64  void setElement(TEveElement* x) { m_el = x; }
65  Bool_t HandleButton(Event_t* event) override;
66  };
67 
69  ~FWGeometryTableViewBase() override;
70 
71  virtual void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
72 
73  // void chosenItemFrom3DView(int);
74  virtual void chosenItem(int);
75  void selectView(int);
76 
78  virtual FWGeometryTableManagerBase* getTableManager() { return nullptr; }
79 
80  // ---------- const member functions ---------------------
81 
82  void addTo(FWConfiguration&) const override;
83  void saveImageTo(const std::string& iName) const override {}
84  void nodeColorChangeRequested(Color_t);
85 
86  void setBackgroundColor();
88  virtual void refreshTable3D();
89 
90  void cdNode(int);
91  virtual void cdTop();
92  virtual void cdUp();
93  virtual void setPath(int, std::string&);
94 
95  void checkExpandLevel();
96 
97  int getTopNodeIdx() const { return TMath::Max((int)m_topNodeIdx.value(), 0); }
98 
100  void transparencyChanged();
101 
102  void reloadColors();
103 
108 
109 protected:
110 #ifndef __CINT__
114 
119 #endif
120 
123 
124  // TGCompositeFrame *m_settersFrame;
125 
127 
128  TEveWindowFrame* m_eveWindow;
129  TGCompositeFrame* m_frame;
130 
132 
134 
136 
139  TEveScene* m_eveScene;
140 
141 #ifndef __CINT__
142  // std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
143 #endif
144  // void resetSetters();
145  // void makeSetter(TGCompositeFrame* frame, FWParameterBase* param);
146 
147  void postConst();
148 
149  void setTopNodePathFromConfig(const FWConfiguration& iFrom);
150 
151  void populateController(ViewerParameterGUI&) const override;
152 
153 private:
155 
156  FWGeometryTableViewBase(const FWGeometryTableViewBase&); // stop default
157  const FWGeometryTableViewBase& operator=(const FWGeometryTableViewBase&); // stop default
158  void setColumnSelected(int idx);
160 };
161 
162 #endif
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 setTopNodePathFromConfig(const FWConfiguration &iFrom)
const FWConfiguration * m_viewersConfig
void addTo(FWConfiguration &) const override
FWLongParameter m_leafTransparencyFactor
ClassDef(FWGeometryTableViewBase, 0)
FWEveDigitSetScalableMarker * getMarker()
void saveImageTo(const std::string &iName) const override
virtual void setPath(int, std::string &)
FWGeometryTableViewBase(TEveWindowSlot *, FWViewType::EType, FWColorManager *)
const FWGeometryTableViewBase & operator=(const FWGeometryTableViewBase &)
void populateController(ViewerParameterGUI &) const override
FWViewCombo(const TGWindow *p, FWGeometryTableViewBase *t)
Definition: event.py:1
virtual FWGeometryTableManagerBase * getTableManager()