#include <mgui/customdraw.h>
Inheritance diagram for MGUI::CUSTOMDRAW:

Public Types | |
| enum | DRAWSTAGE { DRAWSTAGE_PrePaint = 0x00000001, DRAWSTAGE_PostPaint = 0x00000002, DRAWSTAGE_PreErase = 0x00000003, DRAWSTAGE_PostErase = 0x00000004, DRAWSTAGE_CtrlPrePaint = DRAWSTAGE_PrePaint, DRAWSTAGE_CtrlPostPaint = DRAWSTAGE_PostPaint, DRAWSTAGE_CtrlPreErase = DRAWSTAGE_PreErase, DRAWSTAGE_CtrlPostErase = DRAWSTAGE_PostErase, DRAWSTAGE_Item = 0x00010000, DRAWSTAGE_ItemPrePaint = DRAWSTAGE_Item | DRAWSTAGE_PrePaint, DRAWSTAGE_ItemPostPaint = DRAWSTAGE_Item | DRAWSTAGE_PostPaint, DRAWSTAGE_ItemPreErase = DRAWSTAGE_Item | DRAWSTAGE_PreErase, DRAWSTAGE_ItemPostErase = DRAWSTAGE_Item | DRAWSTAGE_PostErase, DRAWSTAGE_SubItem = 0x00020000, DRAWSTAGE_SubItemPrePaint = DRAWSTAGE_SubItem | DRAWSTAGE_ItemPrePaint, DRAWSTAGE_SubItemPostPaint = DRAWSTAGE_SubItem | DRAWSTAGE_ItemPostPaint } |
| enum | ITEMSTATE { ITEMSTATE_Normal = 0x0000, ITEMSTATE_Selected = 0x0001, ITEMSTATE_Grayed = 0x0002, ITEMSTATE_Disabled = 0x0004, ITEMSTATE_Checked = 0x0008, ITEMSTATE_Focus = 0x0010, ITEMSTATE_Default = 0x0020, ITEMSTATE_Hot = 0x0040, ITEMSTATE_Marked = 0x0080, ITEMSTATE_Indeterminant = 0x0100 } |
| enum | RETVALUE { RETVALUE_DoDefault = 0x00, RETVALUE_SkipDefault = 0x04, RETVALUE_NotifyPostPaint = 0x10, RETVALUE_NotifyItemDraw = 0x20, RETVALUE_NotifySubItemDraw = 0x20, RETVALUE_NotifyPostErase = 0x40 } |
Public Member Functions | |
| MGD::CONTEXT * | GetDrawingContext () const |
| DRAWSTAGE | GetDrawStage () const |
| ID | GetID () const |
| ITEMSTATE | GetItemState () const |
| const LRECT2D & | GetRect () const |
| void | SetDrawStage (DRAWSTAGE drawstage) |
Protected Member Functions | |
| CUSTOMDRAW (DRAWSTAGE drawstage, ITEMSTATE itemstate, INT32 ItemNumber, ID id, const LRECT2D &rect) | |
| CUSTOMDRAW () | |
| INT32 | GetItemNumber () const |
| void | SetBase (const NMCUSTOMDRAW *pNM) |
| void | SetBase (ITEMSTATE itemstate, INT32 ItemNumber, ID id, const LRECT2D &rect) |
| void | SetDrawingContext (MGD::CONTEXT *pDC) |
| ~CUSTOMDRAW () | |
Custom draw allows an application to easily change selected drawing aspects or manually draw selected items without having to do a full owner draw.
At the beginning of each 'paint' cycle, the control's v_OnCustomDraw function will be called with a CUSTOMDRAW-derived class instance having its drawing stage set to DRAWSTAGE_PrePaint. The value the application returns from this first notification dictates how and when the control sends subsequent custom draw notifications fo rthe rest of that paint cycle. The application can return a combination of the following flags in response to this first notification.
RETVALUE_DoDefault Control will draw itself, no additional notifications will be sent for this paint cycle. RETVALUE_NotifyItemDraw v_OnCustomDraw will be called for any item-specific drawing, before and after items are drawn. RETVALUE_NotifyPostPaint v_OnCustomDraw will be called when painting cycle for entire control is complete RETVALUE_SkipDefault Control will not perform any painting at all
If the application returns RETVALUE_NotifyItemDraw for the initial prepaint notification, notifications will be sent for each items it draws during that paint cycle. These item-specific notifications will have a drawing stage of DRAWSTAGE_ItemPrePaint. Notification for when it it finished drawing the item may then be requested by returning RETVALUE_NotifyPostPaint. Otherwise return RETVALUE_DoDefault and no post-paint notification will be sent. If the application draws the entire item, return RETVALUE_SkipDefault and the control will not draw any portion of the item.
Definition at line 61 of file customdraw.h.
|
|
Drawing stage.
Definition at line 66 of file customdraw.h. |
|
|
Item state.
Definition at line 87 of file customdraw.h. |
|
|
Values to return from control-specific v_OnCustomDraw override. The values the application can return depend on the current drawing stage.
Definition at line 102 of file customdraw.h. |
|
|
Reimplemented in MGUI::CTRL_TREE::CUSTOMDRAW. |
|
||||||||||||||||||||||||
|
|
|
|
Reimplemented in MGUI::CTRL_TREE::CUSTOMDRAW. Definition at line 143 of file customdraw.h. |
|
|
Definition at line 111 of file customdraw.h. |
|
|
Definition at line 114 of file customdraw.h. |
|
|
Definition at line 117 of file customdraw.h. |
|
|
Definition at line 146 of file customdraw.h. |
|
|
Definition at line 120 of file customdraw.h. |
|
|
Definition at line 123 of file customdraw.h. |
|
|
|
|
||||||||||||||||||||
|
|
|
|
Definition at line 162 of file customdraw.h. |
|
|
Definition at line 126 of file customdraw.h. |
1.3.8-20040913