CMS 3D CMS Logo

FWTableWidget.h
Go to the documentation of this file.
1 #ifndef Fireworks_TableWidget_FWTableWidget_h
2 #define Fireworks_TableWidget_FWTableWidget_h
3 // -*- C++ -*-
4 //
5 // Package: TableWidget
6 // Class : FWTableWidget
7 //
18 //
19 // Original Author: Chris Jones
20 // Created: Mon Feb 2 16:45:47 EST 2009
21 //
22 
23 // system include files
24 #include "TGFrame.h"
25 
26 // user include files
27 
28 // forward declarations
29 class FWTableManagerBase;
30 class FWTabularWidget;
31 class TGVScrollBar;
32 class TGHScrollBar;
33 class TGGC;
34 
35 class FWTableWidget : public TGCompositeFrame
36 {
37 
38 public:
39  FWTableWidget(FWTableManagerBase* iManager,const TGWindow* p=nullptr);
40  ~FWTableWidget() override;
41 
42  // ---------- const member functions ---------------------
43  //the standard method gives the wrong values when using a TGTabularLayout
44  TGDimension GetDefaultSize() const override;
45 
46  // ---------- static member functions --------------------
47 
48  // ---------- member functions ---------------------------
49  using TGFrame::Resize;
50  void Resize(UInt_t w, UInt_t h) override;
51  void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0) override;
52  void SetBackgroundColor(Pixel_t) override;
53  void SetHeaderBackgroundColor(Pixel_t);
54  void SetHeaderForegroundColor(Pixel_t);
55  void SetLineSeparatorColor(Pixel_t);
56 
57  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override;
58 
62  void sort(UInt_t iColumn, bool iDescendingSort);
63 
64  void buttonReleasedInHeader(Int_t row, Int_t column, Event_t* event,Int_t, Int_t);
65  void buttonReleasedInBody(Int_t row, Int_t column, Event_t* event, Int_t,Int_t);
66 
75  void rowClicked(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY); //*SIGNAL*
76  void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
77  void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod); //*SIGNAL*
78  void childrenEvent(Event_t *);
79  void Clicked();
80 
82 
83  void forceLayout() { m_forceLayout = true; }
84  void dataChanged();
85 
86  void buttonPressedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
87  void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
88 
89  int sortedColumn () const { return m_sortedColumn; }
90  bool descendingSort () const { return m_descendingSort; }
91 
92  FWTabularWidget* body() { return m_body; }
93 
94  void disableGrowInWidth();
95 
96 protected:
97  void DoRedraw() override;
98 
99 private:
100  //FWTableWidget(const FWTableWidget&); // stop default
101 
102  //const FWTableWidget& operator=(const FWTableWidget&); // stop default
103 
104  // ---------- member data --------------------------------
105  bool handleResize(UInt_t w, UInt_t h);
112  TGVScrollBar* m_vSlider;
113  TGHScrollBar* m_hSlider;
116 
120 
124 };
125 
126 
127 #endif
void Resize(UInt_t w, UInt_t h) override
void DoRedraw() override
void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
FWTableManagerBase * m_bodyTable
const double w
Definition: UKUtility.cc:23
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TGVScrollBar * m_vSlider
TGGC * m_headerBackground
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
void SetHeaderBackgroundColor(Pixel_t)
void forceLayout()
Definition: FWTableWidget.h:83
bool handleResize(UInt_t w, UInt_t h)
TGDimension GetDefaultSize() const override
void SetLineSeparatorColor(Pixel_t)
FWTableWidget(FWTableManagerBase *iManager, const TGWindow *p=nullptr)
ClassDefOverride(FWTableWidget, 0)
void buttonReleasedInBody(Int_t row, Int_t column, Event_t *event, Int_t, Int_t)
void sort(UInt_t iColumn, bool iDescendingSort)
void disableGrowInWidth()
FWTabularWidget * m_body
TGGC * m_headerForeground
bool descendingSort() const
Definition: FWTableWidget.h:90
void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
TGGC * m_lineSeparator
FWTabularWidget * body()
Definition: FWTableWidget.h:92
void SetBackgroundColor(Pixel_t) override
FWTabularWidget * m_rowHeader
void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod)
tuple msg
Definition: mps_check.py:279
int sortedColumn() const
Definition: FWTableWidget.h:89
~FWTableWidget() override
void buttonPressedInRowHeader(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
void childrenEvent(Event_t *)
void rowClicked(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
void SetHeaderForegroundColor(Pixel_t)
void buttonReleasedInHeader(Int_t row, Int_t column, Event_t *event, Int_t, Int_t)
FWTableManagerBase * m_headerTable
FWTabularWidget * m_header
FWTableManagerBase * m_rowHeaderTable
Definition: event.py:1
TGHScrollBar * m_hSlider