Developer

API Reference

IDrawHandler

Brew Release
Brew MP 1.0.2
See Also
DRAWHANDLERDESC_Init() IDrawHandler_SetDraw() DRAWHANDLERDESC_Call()
Description
This interface allows an application to hook a custom drawing routine into the default draw operation normally invoked for a widget.
Supported Events: The draw handler passes all received events to its child widget.
Usage
An application wishing to hook a custom draw handler into the drawing chain for a widget may QueryInterface for the IDrawHandler interface (AEEIID_IDrawHandler) and then register its draw handler by calling IDrawHandler_SetDraw().
The call to IDrawHandler_SetDraw() swaps the contents of the DrawHandlerDesc data structure, effectively filling the structure with default draw handler (i.e., the draw handler that would be called if a custom handler had not been attached to the widget). The application should preserve the contents of this structure and pass it to DRAWHANDLERDESC_Call() within the custom draw handler itself to insure that the drawing chain continues. The application may choose to perform its drawing either prior to or following the call to DRAWHANDLERDESC_Call(). For example, a custom draw handler that wishes to superimpose a logo over the top of another object (sort of like station branding on cable TV broadcasts), might choose to call DRAWHANDLERDESC_Call() first to allow the default drawing to take place, and then perform it's own custom rendering.
  • Follow