CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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=0);
40  virtual ~FWTableWidget();
41 
42  // ---------- const member functions ---------------------
43  //the standard method gives the wrong values when using a TGTabularLayout
44  TGDimension GetDefaultSize() const;
45 
46  // ---------- static member functions --------------------
47 
48  // ---------- member functions ---------------------------
49  using TGFrame::Resize;
50  virtual void Resize(UInt_t w, UInt_t h);
51  virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
52  void SetBackgroundColor(Pixel_t);
53  void SetHeaderBackgroundColor(Pixel_t);
54  void SetHeaderForegroundColor(Pixel_t);
55  void SetLineSeparatorColor(Pixel_t);
56 
57  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
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  virtual void DoRedraw();
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 SetBackgroundColor(Pixel_t)
void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
FWTableManagerBase * m_bodyTable
TGVScrollBar * m_vSlider
TGGC * m_headerBackground
void SetHeaderBackgroundColor(Pixel_t)
void forceLayout()
Definition: FWTableWidget.h:83
bool handleResize(UInt_t w, UInt_t h)
TGDimension GetDefaultSize() const
void SetLineSeparatorColor(Pixel_t)
void buttonReleasedInBody(Int_t row, Int_t column, Event_t *event, Int_t, Int_t)
virtual ~FWTableWidget()
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)
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
TGGC * m_lineSeparator
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
FWTabularWidget * body()
Definition: FWTableWidget.h:92
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void DoRedraw()
ClassDef(FWTableWidget, 0)
#define column(...)
Definition: DbCore.h:74
FWTabularWidget * m_rowHeader
void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod)
int sortedColumn() const
Definition: FWTableWidget.h:89
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)
virtual void Resize(UInt_t w, UInt_t h)
T w() const
void buttonReleasedInHeader(Int_t row, Int_t column, Event_t *event, Int_t, Int_t)
Definition: DDAxes.h:10
FWTableManagerBase * m_headerTable
FWTabularWidget * m_header
FWTableManagerBase * m_rowHeaderTable
TGHScrollBar * m_hSlider
FWTableWidget(FWTableManagerBase *iManager, const TGWindow *p=0)