Widget class's Renderer interface.
More...
#include <mwidget.h>
Widget class's Renderer interface.
- const char* rdr_name
The Name of the Renderer
- void class_init(mWidgetRenderer* rdr);
init the the renderer class members
- mWidgetRenderer * ptrParentClass
Supper class pointer
- BOOL init_self(mWidgetRenderer *rdr);
init the prv_data for a special mWidgetRenderer object
- void uninit_self(mWidgetRenderer *rdr);
uninitialize the prv_data for the special mWidgetRenderer object
- DWORD setElement(mWidgetRenderer * rdr, int id, DWORD value); set the element by id and value
- Parameters
-
id | the id of Renderer element |
value | the value of Renderer element |
- Returns
- old value or (DWORD)-1 (failed)
- DWORD getElement(mWidgetRenderer *rdr,int id);
get the element from renderer - Parameters
-
id | - the id of renderer element |
- Returns
- DWORD - the value of speical element
- void * prv_data - the private data used by renderer object
- BOOL transIdValue(mWidgetRenderer* rdr, int id, DWORD *value);
Translate from value from use type to inner type. e.g. translate image name(const char*) into res key (RES_KEY) - Parameters
-
id | - the id of the element |
* | value - in and out param, the value pointer of element |
- Returns
- BOOL - True or False
- void drawFocusFrame(mWidget *, HWND, HDC, const RECT*);
draw focus frame when control get focus - Parameters
-
- | handle of control |
- | DC of control |
RECT | * - the Rectangle to draw focus frame |
- BOOL drawBkground(mWidget * ,HWND, HDC, const RECT*)
draw background when control erase background - Parameters
-
- | DC of background, may be 0, user should get dc by GetClientDC |
RECT* | - invalidat Rectangle of background |
- Returns
- BOOL - if the background has been drawed or not
- void draw3dbox(mWidgetRenderer* , HDC hdc, const RECT *, DWORD color DWORD flag);
draw 3d box - Parameters
-
hdc | - the DC in which draw 3d box |
RECT | * - the Rectange of the box |
color | - the frame color of box |
flag | - the state (ncsRendererState) and flag (ncsRendererFlag) of 3dbox |
- void drawCheckbox (mWidget *, HDC hdc, const RECT *rc, DWORD flag);
draw a checkbox into a DC - Parameters
-
hdc | - the DC in which draw checkbox |
rc | - the location and size of checkbox |
flag | - the flag of check box (ncsRendererFlag) |
- void drawRadio (mWidget *, HDC hdc, const RECT *rc, DWORD flag);
draw a radio box into a DC
- Parameters
-
hdc | - the DC in which draw radiobox |
rc | - the location and size of radio box |
flag | - the flag of radiobox (ncsRendererFlag) |
- void drawArrow (mWidget *, HDC hdc, const RECT *rc, int arrow, DWORD color, DWORD flag);
draw an arrow for dc - Parameters
-
hdc | - the handle to DC |
rc | - the Rectangle around arrow, its size bigger than arrow |
arrow | - arrow type (ncsRDRArrow) |
color | - the filling color of arrow |
flag | - the flag of arrow (ncsRendererFlag) |
- void drawItem (mWidget*, HDC hdc, const RECT *rc, DWORD color);
draw an item - Parameters
-
rc | - the rectanle of item |
color | - the filling color of item |
- See also
- mWidget, mWidgetClass
The documentation for this struct was generated from the following file: