CMS 3D CMS Logo

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 public:
35  static const TGGC& getDefaultGC();
36  static const TGGC& getFillGC();
37 
39 
40  FWFramedTextTableCellRenderer(const TGGC* iTextContext = &(getDefaultGC()),
41  const TGGC* iFillContext = &(getFillGC()),
42  Justify iJustify = kJustifyLeft);
44 
45  // ---------- const member functions ---------------------
46  const TGGC* graphicsContext() const { return m_context; }
47  UInt_t width() const override;
48  UInt_t height() const override;
49 
50  const TGFont* font() const;
51  // ---------- static member functions --------------------
52 
53  // ---------- member functions ---------------------------
54  void setData(const std::string&);
55  void setGraphicsContext(const TGGC* iContext) { m_context = iContext; }
56  void setJustify(Justify);
57 
58  void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override;
59 
60  FWFramedTextTableCellRenderer(const FWFramedTextTableCellRenderer&) = delete; // stop default
61 
62  const FWFramedTextTableCellRenderer& operator=(const FWFramedTextTableCellRenderer&) = delete; // stop default
63 
64 private:
65  // ---------- member data --------------------------------
66  const TGGC* m_context;
67  const TGGC* m_frameContext;
68  TGFont* m_font;
71 };
72 
73 #endif
UInt_t height() const override
returns the minimum height of the cell to which the renderer is representing
UInt_t width() const override
returns the minimum width of the cell to which the renderer is representing
void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override
const FWFramedTextTableCellRenderer & operator=(const FWFramedTextTableCellRenderer &)=delete
void setGraphicsContext(const TGGC *iContext)
FWFramedTextTableCellRenderer(const TGGC *iTextContext=&(getDefaultGC()), const TGGC *iFillContext=&(getFillGC()), Justify iJustify=kJustifyLeft)