Public Member Functions | |
virtual | ~ICellPaintFormat () |
virtual destructor | |
virtual ICellPaintFormat * | Clone () const =0 |
Gets a clone of a format. | |
Painting | |
virtual void | DrawCell (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Paints a cell in CGrid. | |
virtual COLORREF | GetBackColor (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Gets an effective background color of a cell after blending. | |
virtual COLORREF | GetForeColor (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Gets an effective foreground color of a cell after blending. | |
Cell dimensions | |
virtual int | GetOptimalCellWidth (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Gets an optimal width of a cell. | |
virtual CRect | GetImageRect (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Gets the rectangle, occupied by the icon painted in a cell. | |
virtual CRect | GetTextRect (CGridCell &cell, const CPaintContext &paintContext, UINT paintFilter) const =0 |
Gets cell bounds where a text can be drawn. | |
Serialization | |
virtual BOOL | IsSerializableType () const |
Indicates whether an object of a class that implements ICellPaintFormat can be serialized. | |
virtual CString | GetFormatName () const |
Gets a format name. | |
virtual void | Serialize (CArchive &ar) |
Serializes an object to the archive. |
This format paints the following elements: background, text, icons, selection, focus, +/- signs for unrolling and rolling up the hierarchy. Moreover, when embedded controls are used, a part of painting can be handed over to those controls. GUI library provides a number of those interface implementations that can be used to paint a grid cell. It is also possible to implement a personal format that allows to totally redefine painting in the grid. From a practical point of view it is reasonable to redefine ICellPaintFormat for radically new data presentation in the grid. In most cases where it is required to just change text or background colors, forbid selection or focus painting and also customize a font or highlighting for each cell the easiest way is to redefine ICustomDraw interface that is the central point for passing all information necessary for painting.
void DrawCell | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Paints a cell in CGrid.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat, and CProgressCellPaintFormat.
COLORREF GetBackColor | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Gets an effective background color of a cell after blending.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat.
COLORREF GetForeColor | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Gets an effective foreground color of a cell after blending.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat.
int GetOptimalCellWidth | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Gets an optimal width of a cell.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat.
CRect GetImageRect | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Gets the rectangle, occupied by the icon painted in a cell.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat.
CRect GetTextRect | ( | CGridCell & | cell, | |
const CPaintContext & | paintContext, | |||
UINT | paintFilter | |||
) | const [pure virtual] |
Gets cell bounds where a text can be drawn.
[in] | cell | Cell related information |
[in] | paintContext | Contains common information like device context, header, grid etc. |
[in] | paintFilter | Set of painting operations, defined in PaintFilter enumeration. |
Implemented in CCellPaintFormat.
ICellPaintFormat * Clone | ( | ) | const [pure virtual] |
BOOL IsSerializableType | ( | ) | const [virtual] |
Indicates whether an object of a class that implements ICellPaintFormat can be serialized.
CString GetFormatName | ( | ) | const [virtual] |
Gets a format name.
void Serialize | ( | CArchive & | ar | ) | [virtual] |
Serializes an object to the archive.
[in] | ar | Archive to serialize an object. |
Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |