|
CGridListCtrlEx
|
CGridColumnTraitText provides customization of cell text and background. More...
Public Member Functions | |
| CGridColumnTraitText () | |
| CGridColumnTraitText - Constructor. | |
| virtual void | OnCustomDraw (CGridListCtrlEx &owner, NMLVCUSTOMDRAW *pLVCD, LRESULT *pResult) |
| Overrides the custom draw handler, to allow custom coloring of cells with this column trait. More... | |
| virtual int | OnSortRows (LPCTSTR pszLeftValue, LPCTSTR pszRightValue, bool bAscending) |
| Compares two cell values according to specified sort order. More... | |
| virtual int | OnSortRows (const LVITEM &leftItem, const LVITEM &rightItem, bool bAscending) |
| Override OnSortRows() to provide your own special row sorting. More... | |
| void | SetSortFormatNumber (bool bValue) |
| Should cell values be compared as numbers when sorting. More... | |
Public Member Functions inherited from CGridColumnTrait | |
| virtual | ~CGridColumnTrait () |
| Destructor. | |
| virtual void | OnInsertColumn (CGridListCtrlEx &owner, int nCol) |
| Override OnInsertColumn() to provide your own special styling of the column, after column has been added. More... | |
| virtual int | OnClickEditStart (CGridListCtrlEx &owner, int nRow, int nCol, CPoint pt, bool bDblClick) |
| Override OnClickEditStart() to control whether cell edit should be started when clicked with the mouse. More... | |
| virtual CWnd * | OnEditBegin (CGridListCtrlEx &owner, int nRow, int nCol) |
| Override OnEditBegin() to provide your own special cell-edit control. More... | |
| virtual CWnd * | OnEditBegin (CGridListCtrlEx &owner, int nRow, int nCol, CPoint pt) |
| Override OnEditBegin() to provide your own special cell-edit control. More... | |
| virtual void | OnEditEnd () |
| Override OnEditEnd() in case one need to change state after a cell-edit. | |
| virtual bool | IsCellReadOnly (CGridListCtrlEx &owner, int nRow, int nCol, CPoint pt) const |
| Override IsCellReadOnly() to provide custom control whether a cell can be edited. More... | |
| ColumnState & | GetColumnState () |
| BOOL | HasMetaFlag (DWORD flag) |
| void | SetMetaFlag (DWORD flag, bool enable) |
Protected Member Functions | |
| virtual bool | UpdateTextFont (NMLVCUSTOMDRAW *pLVCD, LOGFONT &textFont) |
| Specifies af the font color if one is specified. More... | |
| virtual bool | UpdateTextColor (NMLVCUSTOMDRAW *pLVCD, COLORREF &textColor) |
| Changes the text color if one is specified. More... | |
| virtual bool | UpdateBackColor (NMLVCUSTOMDRAW *pLVCD, COLORREF &backColor) |
| Changes the background color if one is specified. More... | |
| virtual void | Accept (CGridColumnTraitVisitor &visitor) |
| Accept Visitor Pattern. | |
| virtual int | GetCellFontHeight (CGridListCtrlEx &owner) |
| Calculates the proper row-height according to font, which a cell value editor should fit in. More... | |
| virtual CRect | GetCellEditRect (CGridListCtrlEx &owner, int nRow, int nCol) |
| Returns the proper rectangle, which a cell value editor should fit in. More... | |
Protected Attributes | |
| CFont * | m_pOldFont |
| Backup of the original font while drawing with specified font. | |
| COLORREF | m_OldTextColor |
| Backup of the original text color while drawing with specified color. | |
| COLORREF | m_OldBackColor |
| Backup of the original background color while drawing with specified color. | |
| COLORREF | m_TextColor |
| Text color to use for this column. | |
| COLORREF | m_BackColor |
| Background color to use for this column. | |
| bool | m_SortFormatNumber |
| Column contains integers. | |
Protected Attributes inherited from CGridColumnTrait | |
| ColumnState | m_ColumnState |
CGridColumnTraitText provides customization of cell text and background.
|
protectedvirtual |
Returns the proper rectangle, which a cell value editor should fit in.
| owner | The list control for the inplace cell value editor |
| nRow | The index of the row |
| nCol | The index of the column |
|
protectedvirtual |
Calculates the proper row-height according to font, which a cell value editor should fit in.
| owner | The list control for the inplace cell value editor |
|
virtual |
Overrides the custom draw handler, to allow custom coloring of cells with this column trait.
| owner | The list control drawing |
| pLVCD | Pointer to NMLVCUSTOMDRAW structure |
| pResult | Modification to the drawing stage (CDRF_NEWFONT, etc.) |
Reimplemented from CGridColumnTrait.
|
virtual |
Compares two cell values according to specified sort order.
| pszLeftValue | Left cell value |
| pszRightValue | Right cell value |
| bAscending | Perform sorting in ascending or descending order |
Reimplemented from CGridColumnTrait.
Reimplemented in CGridColumnTraitImage, and CGridColumnTraitDateTime.
|
inlinevirtual |
Override OnSortRows() to provide your own special row sorting.
| leftItem | Left cell item |
| rightItem | Right cell item |
| bAscending | Perform sorting in ascending or descending order |
Reimplemented from CGridColumnTrait.
Reimplemented in CGridColumnTraitImage, and CGridColumnTraitDateTime.
| void CGridColumnTraitText::SetSortFormatNumber | ( | bool | bValue | ) |
Should cell values be compared as numbers when sorting.
| bValue | Enabled / Disabled |
|
protectedvirtual |
Changes the background color if one is specified.
| pLVCD | Pointer to NMLVCUSTOMDRAW structure |
| backColor | Current background color |
|
protectedvirtual |
Changes the text color if one is specified.
| pLVCD | Pointer to NMLVCUSTOMDRAW structure |
| textColor | Current text color |
Reimplemented in CGridColumnTraitHyperLink.
|
protectedvirtual |
Specifies af the font color if one is specified.
| pLVCD | Pointer to NMLVCUSTOMDRAW structure |
| textFont | New font specification |
Reimplemented in CGridColumnTraitHyperLink.
1.8.11