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 // $Id: FWTableWidget.h,v 1.16 2011/03/07 13:13:51 amraktad Exp $
22 //
23 
24 // system include files
25 #include "TGFrame.h"
26 
27 // user include files
28 
29 // forward declarations
30 class FWTableManagerBase;
31 class FWTabularWidget;
32 class TGVScrollBar;
33 class TGHScrollBar;
34 class TGGC;
35 
36 class FWTableWidget : public TGCompositeFrame
37 {
38 
39 public:
40  FWTableWidget(FWTableManagerBase* iManager,const TGWindow* p=0);
41  virtual ~FWTableWidget();
42 
43  // ---------- const member functions ---------------------
44  //the standard method gives the wrong values when using a TGTabularLayout
45  TGDimension GetDefaultSize() const;
46 
47  // ---------- static member functions --------------------
48 
49  // ---------- member functions ---------------------------
50  using TGFrame::Resize;
51  virtual void Resize(UInt_t w, UInt_t h);
52  virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
53  void SetBackgroundColor(Pixel_t);
54  void SetHeaderBackgroundColor(Pixel_t);
55  void SetHeaderForegroundColor(Pixel_t);
56  void SetLineSeparatorColor(Pixel_t);
57 
58  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
59 
63  void sort(UInt_t iColumn, bool iDescendingSort);
64 
65  void buttonReleasedInHeader(Int_t row, Int_t column, Event_t* event,Int_t, Int_t);
66  void buttonReleasedInBody(Int_t row, Int_t column, Event_t* event, Int_t,Int_t);
67 
76  void rowClicked(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY); //*SIGNAL*
77  void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
78  void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod); //*SIGNAL*
79  void childrenEvent(Event_t *);
80  void Clicked();
81 
83 
84  void forceLayout() { m_forceLayout = true; }
85  void dataChanged();
86 
87  void buttonPressedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
88  void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
89 
90  int sortedColumn () const { return m_sortedColumn; }
91  bool descendingSort () const { return m_descendingSort; }
92 
93  FWTabularWidget* body() { return m_body; }
94 
95  void disableGrowInWidth();
96 
97 protected:
98  virtual void DoRedraw();
99 
100 private:
101  //FWTableWidget(const FWTableWidget&); // stop default
102 
103  //const FWTableWidget& operator=(const FWTableWidget&); // stop default
104 
105  // ---------- member data --------------------------------
106  bool handleResize(UInt_t w, UInt_t h);
113  TGVScrollBar* m_vSlider;
114  TGHScrollBar* m_hSlider;
117 
121 
125 };
126 
127 
128 #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:84
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:91
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
FWTabularWidget * body()
Definition: FWTableWidget.h:93
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)
unsigned int UInt_t
Definition: FUTypes.h:12
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
FWTabularWidget * m_rowHeader
void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod)
int sortedColumn() const
Definition: FWTableWidget.h:90
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)