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 public:
37  FWTableWidget(FWTableManagerBase* iManager, const TGWindow* p = nullptr);
38  ~FWTableWidget() override;
39 
40  // ---------- const member functions ---------------------
41  //the standard method gives the wrong values when using a TGTabularLayout
42  TGDimension GetDefaultSize() const override;
43 
44  // ---------- static member functions --------------------
45 
46  // ---------- member functions ---------------------------
47  using TGFrame::Resize;
48  void Resize(UInt_t w, UInt_t h) override;
49  void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0) override;
50  void SetBackgroundColor(Pixel_t) override;
51  void SetHeaderBackgroundColor(Pixel_t);
52  void SetHeaderForegroundColor(Pixel_t);
53  void SetLineSeparatorColor(Pixel_t);
54 
55  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override;
56 
60  void sort(UInt_t iColumn, bool iDescendingSort);
61 
62  void buttonReleasedInHeader(Int_t row, Int_t column, Event_t* event, Int_t, Int_t);
63  void buttonReleasedInBody(Int_t row, Int_t column, Event_t* event, Int_t, Int_t);
64 
73  void rowClicked(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY); //*SIGNAL*
74  void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
75  void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod); //*SIGNAL*
76  void childrenEvent(Event_t*);
77  void Clicked();
78 
80 
81  void forceLayout() { m_forceLayout = true; }
82  void dataChanged();
83 
84  void buttonPressedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
85  void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
86 
87  int sortedColumn() const { return m_sortedColumn; }
88  bool descendingSort() const { return m_descendingSort; }
89 
90  FWTabularWidget* body() { return m_body; }
91 
92  void disableGrowInWidth();
93 
94 protected:
95  void DoRedraw() override;
96 
97 private:
98  //FWTableWidget(const FWTableWidget&); // stop default
99 
100  //const FWTableWidget& operator=(const FWTableWidget&); // stop default
101 
102  // ---------- member data --------------------------------
103  bool handleResize(UInt_t w, UInt_t h);
110  TGVScrollBar* m_vSlider;
111  TGHScrollBar* m_hSlider;
114 
118 
122 };
123 
124 #endif
void Resize(UInt_t w, UInt_t h) override
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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
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:81
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:88
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:90
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:285
int sortedColumn() const
Definition: FWTableWidget.h:87
~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