Go to the documentation of this file.00001 #ifndef Fireworks_TableWidget_FWTableWidget_h
00002 #define Fireworks_TableWidget_FWTableWidget_h
00003
00004
00005
00006
00007
00018
00019
00020
00021
00022
00023
00024
00025 #include "TGFrame.h"
00026
00027
00028
00029
00030 class FWTableManagerBase;
00031 class FWTabularWidget;
00032 class TGVScrollBar;
00033 class TGHScrollBar;
00034 class TGGC;
00035
00036 class FWTableWidget : public TGCompositeFrame
00037 {
00038
00039 public:
00040 FWTableWidget(FWTableManagerBase* iManager,const TGWindow* p=0);
00041 virtual ~FWTableWidget();
00042
00043
00044
00045 TGDimension GetDefaultSize() const;
00046
00047
00048
00049
00050 using TGFrame::Resize;
00051 virtual void Resize(UInt_t w, UInt_t h);
00052 virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0);
00053 void SetBackgroundColor(Pixel_t);
00054 void SetHeaderBackgroundColor(Pixel_t);
00055 void SetHeaderForegroundColor(Pixel_t);
00056 void SetLineSeparatorColor(Pixel_t);
00057
00058 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00059
00063 void sort(UInt_t iColumn, bool iDescendingSort);
00064
00065 void buttonReleasedInHeader(Int_t row, Int_t column, Event_t* event,Int_t, Int_t);
00066 void buttonReleasedInBody(Int_t row, Int_t column, Event_t* event, Int_t,Int_t);
00067
00076 void rowClicked(Int_t iRow, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
00077 void cellClicked(Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY);
00078 void columnClicked(Int_t iColumn, Int_t iButton, Int_t iKeyMod);
00079 void childrenEvent(Event_t *);
00080 void Clicked();
00081
00082 ClassDef(FWTableWidget,0);
00083
00084 void forceLayout() { m_forceLayout = true; }
00085 void dataChanged();
00086
00087 void buttonPressedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
00088 void buttonReleasedInRowHeader(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY);
00089
00090 int sortedColumn () const { return m_sortedColumn; }
00091 bool descendingSort () const { return m_descendingSort; }
00092
00093 FWTabularWidget* body() { return m_body; }
00094
00095 void disableGrowInWidth();
00096
00097 protected:
00098 virtual void DoRedraw();
00099
00100 private:
00101
00102
00103
00104
00105
00106 bool handleResize(UInt_t w, UInt_t h);
00107 FWTableManagerBase* m_bodyTable;
00108 FWTableManagerBase* m_headerTable;
00109 FWTableManagerBase* m_rowHeaderTable;
00110 FWTabularWidget* m_header;
00111 FWTabularWidget* m_body;
00112 FWTabularWidget* m_rowHeader;
00113 TGVScrollBar* m_vSlider;
00114 TGHScrollBar* m_hSlider;
00115 bool m_showingVSlider;
00116 bool m_showingHSlider;
00117
00118 int m_sortedColumn;
00119 bool m_descendingSort;
00120 bool m_forceLayout;
00121
00122 TGGC* m_headerBackground;
00123 TGGC* m_headerForeground;
00124 TGGC* m_lineSeparator;
00125 };
00126
00127
00128 #endif