Object library ObjcAttach() ObjcChange()
Programming guideline of WinDom

ObjcDraw()

NAME

ObjcDraw() - draws an objet in a formular.

PROTOTYPAGE

int ObjcDraw( int mode, void *win, int index, int depth);

PARAMETERS

mode:

OC_FORM:
if the formular is a window,

OC_TOOLBAR:
if the formular is a toolbar,

OC_OBJC:
if is a classic formular,

win:
a window descriptor or an object tree (OC_OBJC),

index:
object index to draw,

depth:
depth,

return:
a negative code error.

DESCRIPTION

This function replaces the AES objc_draw() function. It is specially designed to draw object in window formular (OC_FORM mode) or toolbar (OC_TOOLBAR mode) but it works on classical formular (OC_OBJC mode) too. Using this last mode, ObjcDraw() is equivalent to objc_draw(). When ObjcDraw() works on a window, the redraw is done with repect to the window clipping. It works even the window formular is behind an another window. If the depth parameter has its OC_MSG sets to 1, the object will be drawn by sending a set of WM_REDRAW messages to the AES kernel (the draw will be handle by EvntWindom()) instead of draw immediatly the object.

WARNING

This function should never be used in a window redraw function (i.e. a function associated to a WM_REDRAW message) because this function is invoked by EvntWindom() on each rectangle of the AES rectangle list and the ObjcDraw() function uses this list too. If you really want draw an object prefer a window formular or use objc_draw() and the global variable clip as clipping area:

     	objc_draw( tree, ROOT, MAXDEPTH, clip.g_x, clip.g_h, clip.g_w, clip.g_h);
SEE ALSO

ObjcChange(), objc_draw()