CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWFramedTextTableCellRenderer.h
Go to the documentation of this file.
1 #ifndef Fireworks_TableWidget_FWFramedTextTableCellRenderer_h
2 #define Fireworks_TableWidget_FWFramedTextTableCellRenderer_h
3 // -*- C++ -*-
4 //
5 // Package: TableWidget
6 // Class : FWFramedTextTableCellRenderer
7 //
17 //
18 // Original Author: Chris Jones
19 // Created: Mon Feb 2 16:43:50 EST 2009
20 //
21 
22 // system include files
23 #include <string>
24 #include "GuiTypes.h"
25 #include "TGResourcePool.h"
26 #include "TGGC.h"
27 
28 // user include files
30 
31 // forward declarations
32 
34 
35 public:
36  static const TGGC& getDefaultGC();
37  static const TGGC& getFillGC();
38 
39  enum Justify {
43  };
44 
45  FWFramedTextTableCellRenderer(const TGGC* iTextContext=&(getDefaultGC()),
46  const TGGC* iFillContext=&(getFillGC()),
47  Justify iJustify=kJustifyLeft);
49 
50  // ---------- const member functions ---------------------
51  const TGGC* graphicsContext() const { return m_context;}
52  virtual UInt_t width() const;
53  virtual UInt_t height() const;
54 
55  const TGFont* font() const;
56  // ---------- static member functions --------------------
57 
58  // ---------- member functions ---------------------------
59  void setData(const std::string&);
60  void setGraphicsContext(const TGGC* iContext) { m_context = iContext;}
61  void setJustify(Justify);
62 
63  virtual void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight);
64 
65 
66 private:
68 
70 
71  // ---------- member data --------------------------------
72  const TGGC* m_context;
73  const TGGC* m_frameContext;
74  TGFont* m_font;
77 };
78 
79 
80 #endif
const FWFramedTextTableCellRenderer & operator=(const FWFramedTextTableCellRenderer &)
virtual UInt_t width() const
returns the minimum width of the cell to which the renderer is representing
virtual UInt_t height() const
returns the minimum height of the cell to which the renderer is representing
virtual void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight)
void setGraphicsContext(const TGGC *iContext)
FWFramedTextTableCellRenderer(const TGGC *iTextContext=&(getDefaultGC()), const TGGC *iFillContext=&(getFillGC()), Justify iJustify=kJustifyLeft)