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 // $Id: FWFramedTextTableCellRenderer.h,v 1.1 2010/04/23 21:36:27 chrjones Exp $
21 //
22 
23 // system include files
24 #include <string>
25 #include "GuiTypes.h"
26 #include "TGResourcePool.h"
27 #include "TGGC.h"
28 
29 // user include files
31 
32 // forward declarations
33 
35 
36 public:
37  static const TGGC& getDefaultGC();
38  static const TGGC& getFillGC();
39 
40  enum Justify {
44  };
45 
46  FWFramedTextTableCellRenderer(const TGGC* iTextContext=&(getDefaultGC()),
47  const TGGC* iFillContext=&(getFillGC()),
48  Justify iJustify=kJustifyLeft);
50 
51  // ---------- const member functions ---------------------
52  const TGGC* graphicsContext() const { return m_context;}
53  virtual UInt_t width() const;
54  virtual UInt_t height() const;
55 
56  const TGFont* font() const;
57  // ---------- static member functions --------------------
58 
59  // ---------- member functions ---------------------------
60  void setData(const std::string&);
61  void setGraphicsContext(const TGGC* iContext) { m_context = iContext;}
62  void setJustify(Justify);
63 
64  virtual void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight);
65 
66 
67 private:
69 
71 
72  // ---------- member data --------------------------------
73  const TGGC* m_context;
74  const TGGC* m_frameContext;
75  TGFont* m_font;
76  std::string m_data;
78 };
79 
80 
81 #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)
unsigned int UInt_t
Definition: FUTypes.h:12
void setGraphicsContext(const TGGC *iContext)
FWFramedTextTableCellRenderer(const TGGC *iTextContext=&(getDefaultGC()), const TGGC *iFillContext=&(getFillGC()), Justify iJustify=kJustifyLeft)