CMS 3D CMS Logo

FWTabularWidget.h
Go to the documentation of this file.
1 #ifndef Fireworks_TableWidget_FWTabularWidget_h
2 #define Fireworks_TableWidget_FWTabularWidget_h
3 // -*- C++ -*-
4 //
5 // Package: TableWidget
6 // Class : FWTabularWidget
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Feb 2 16:45:19 EST 2009
19 //
20 
21 // system include files
22 #include <vector>
23 #include "TGFrame.h"
24 
25 // user include files
26 
27 // forward declarations
28 class FWTableManagerBase;
29 
30 class FWTabularWidget : public TGFrame {
31 public:
32  static const TGGC& getDefaultGC();
33 
34  static const int kTextBuffer;
35  static const int kSeperatorWidth;
36 
37  FWTabularWidget(FWTableManagerBase* iManager, const TGWindow* p = nullptr, GContext_t context = getDefaultGC()());
38  ~FWTabularWidget() override;
39 
40  // ---------- const member functions ---------------------
41  const std::vector<unsigned int>& widthOfTextInColumns() const { return m_widthOfTextInColumns; }
42  UInt_t verticalOffset() const { return m_vOffset; }
43  UInt_t horizontalOffset() const { return m_hOffset; }
44 
45  // ---------- static member functions --------------------
46 
47  // ---------- member functions ---------------------------
48  void setWidthOfTextInColumns(const std::vector<unsigned int>&);
49  void DoRedraw() override;
50  TGDimension GetDefaultSize() const override;
51 
52  void setVerticalOffset(UInt_t);
53  void setHorizontalOffset(UInt_t);
54 
55  Bool_t HandleButton(Event_t* event) override;
56 
57  void buttonPressed(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY); //*SIGNAL*
58  void buttonReleased(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY); //*SIGNAL*
59 
60  void dataChanged();
61  void needToRedraw();
62 
64 
65  void setLineContext(GContext_t iContext);
66  void setBackgroundAreaContext(GContext_t iContext);
67 
68  void disableGrowInWidth() { m_growInWidth = false; }
69 
70 private:
71  //FWTabularWidget(const FWTabularWidget&); // stop default
72 
73  //const FWTabularWidget& operator=(const FWTabularWidget&); // stop default
74 
75  // ---------- member data --------------------------------
76 
77  void translateToRowColumn(Int_t iX, Int_t iY, Int_t& oRow, Int_t& oCol, Int_t& oRelX, Int_t& oRelY) const;
78 
80  std::vector<unsigned int> m_widthOfTextInColumns;
81  std::vector<unsigned int> m_widthOfTextInColumnsMax;
84 
85  unsigned int m_vOffset;
86  unsigned int m_hOffset;
87 
88  GContext_t m_normGC;
89  GContext_t m_backgroundGC;
90 
92 };
93 
94 #endif
void buttonReleased(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
void translateToRowColumn(Int_t iX, Int_t iY, Int_t &oRow, Int_t &oCol, Int_t &oRelX, Int_t &oRelY) const
Bool_t HandleButton(Event_t *event) override
unsigned int m_vOffset
void DoRedraw() override
void setLineContext(GContext_t iContext)
void buttonPressed(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
FWTabularWidget(FWTableManagerBase *iManager, const TGWindow *p=nullptr, GContext_t context=getDefaultGC()())
void setWidthOfTextInColumns(const std::vector< unsigned int > &)
UInt_t verticalOffset() const
~FWTabularWidget() override
static const TGGC & getDefaultGC()
TGDimension GetDefaultSize() const override
GContext_t m_backgroundGC
GContext_t m_normGC
std::vector< unsigned int > m_widthOfTextInColumns
void disableGrowInWidth()
void setHorizontalOffset(UInt_t)
const std::vector< unsigned int > & widthOfTextInColumns() const
ClassDefOverride(FWTabularWidget, 0)
unsigned int m_hOffset
UInt_t horizontalOffset() const
FWTableManagerBase * m_table
void setBackgroundAreaContext(GContext_t iContext)
std::vector< unsigned int > m_widthOfTextInColumnsMax
static const int kSeperatorWidth
static const int kTextBuffer
void setVerticalOffset(UInt_t)
Definition: event.py:1