C
WORD GOLDrawCallback();
Overview
GOLDrawCallback() function MUST BE implemented by the user. This is called inside the GOLDraw() function when the drawing of objects in the active list is completed. User drawing must be done here. Drawing color, line type, clipping region, graphic cursor position and current font will not be changed by GOL if this function returns a zero. To pass drawing control to GOL this function must return a non-zero value. If GOL messaging is not using the active link list, it is safe to modify the list here.
Returns
Return a one if GOLDraw() will have drawing control on the active list. Return a zero if user wants to keep the drawing control.
Preconditions
none
Side Effects
none
Example
#define SIG_STATE_SET 0 #define SIG_STATE_DRAW 1 WORD GOLDrawCallback(){ static BYTE state = SIG_STATE_SET; if(state == SIG_STATE_SET){ // Draw the button with disabled colors GOLPanelDraw(SIG_PANEL_LEFT,SIG_PANEL_TOP, SIG_PANEL_RIGHT,SIG_PANEL_BOTTOM, 0, WHITE, altScheme->EmbossLtColor, altScheme->EmbossDkColor, NULL, GOL_EMBOSS_SIZE); state = SIG_STATE_DRAW; } if(!GOLPanelDrawTsk()){ // do not return drawing control to GOL // drawing is not complete return 0; }else{ state = SIG_STATE_SET; // return drawing control to GOL, drawing is complete return 1; } }