CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTabularWidget.h
Go to the documentation of this file.
1 #ifndef Fireworks_TableWidget_FWTabularWidget_h
2 #define Fireworks_TableWidget_FWTabularWidget_h
3 // -*- C++ -*-
4 //
5 // Package: TableWidget
6 // Class : FWTabularWidget
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Feb 2 16:45:19 EST 2009
19 //
20 
21 // system include files
22 #include <vector>
23 #include "TGFrame.h"
24 
25 // user include files
26 
27 // forward declarations
28 class FWTableManagerBase;
29 
30 class FWTabularWidget : public TGFrame
31 {
32 
33 public:
34  static const TGGC& getDefaultGC();
35 
36  static const int kTextBuffer;
37  static const int kSeperatorWidth;
38 
39  FWTabularWidget(FWTableManagerBase* iManager,const TGWindow* p=0, GContext_t context = getDefaultGC()());
40  virtual ~FWTabularWidget();
41 
42  // ---------- const member functions ---------------------
43  const std::vector<unsigned int>& widthOfTextInColumns() const { return m_widthOfTextInColumns;}
44  UInt_t verticalOffset() const {return m_vOffset;}
45  UInt_t horizontalOffset() const { return m_hOffset;}
46 
47  // ---------- static member functions --------------------
48 
49  // ---------- member functions ---------------------------
50  void setWidthOfTextInColumns(const std::vector<unsigned int>& );
51  void DoRedraw();
52  TGDimension GetDefaultSize() const;
53 
54  void setVerticalOffset(UInt_t);
55  void setHorizontalOffset(UInt_t);
56 
57  virtual Bool_t HandleButton(Event_t *event);
58 
59  void buttonPressed(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY); //*SIGNAL*
60  void buttonReleased(Int_t row, Int_t column, Event_t* event, Int_t relX, Int_t relY); //*SIGNAL*
61 
62  void dataChanged();
63  void needToRedraw();
64 
66 
67  void setLineContext(GContext_t iContext);
68  void setBackgroundAreaContext(GContext_t iContext);
69 
70  void disableGrowInWidth() { m_growInWidth = false; }
71 
72 private:
73  //FWTabularWidget(const FWTabularWidget&); // stop default
74 
75  //const FWTabularWidget& operator=(const FWTabularWidget&); // stop default
76 
77  // ---------- member data --------------------------------
78 
79  void translateToRowColumn(Int_t iX, Int_t iY, Int_t& oRow, Int_t& oCol, Int_t&oRelX, Int_t& oRelY) const;
80 
82  std::vector<unsigned int> m_widthOfTextInColumns;
83  std::vector<unsigned int> m_widthOfTextInColumnsMax;
86 
87  unsigned int m_vOffset;
88  unsigned int m_hOffset;
89 
90  GContext_t m_normGC;
91  GContext_t m_backgroundGC;
92 
94 };
95 
96 
97 #endif
void buttonReleased(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
void translateToRowColumn(Int_t iX, Int_t iY, Int_t &oRow, Int_t &oCol, Int_t &oRelX, Int_t &oRelY) const
FWTabularWidget(FWTableManagerBase *iManager, const TGWindow *p=0, GContext_t context=getDefaultGC()())
unsigned int m_vOffset
void setLineContext(GContext_t iContext)
void buttonPressed(Int_t row, Int_t column, Event_t *event, Int_t relX, Int_t relY)
void setWidthOfTextInColumns(const std::vector< unsigned int > &)
UInt_t verticalOffset() const
TGDimension GetDefaultSize() const
static const TGGC & getDefaultGC()
virtual Bool_t HandleButton(Event_t *event)
GContext_t m_backgroundGC
GContext_t m_normGC
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
std::vector< unsigned int > m_widthOfTextInColumns
void disableGrowInWidth()
void setHorizontalOffset(UInt_t)
const std::vector< unsigned int > & widthOfTextInColumns() const
unsigned int m_hOffset
UInt_t horizontalOffset() const
FWTableManagerBase * m_table
void setBackgroundAreaContext(GContext_t iContext)
std::vector< unsigned int > m_widthOfTextInColumnsMax
ClassDef(FWTabularWidget, 0)
static const int kSeperatorWidth
static const int kTextBuffer
void setVerticalOffset(UInt_t)
virtual ~FWTabularWidget()