Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Color Picker-Defined Functions / Responding to Events in a Color Picker


MyDrawPicker

Color picker-defined subroutine that handles a kDrawPicker request.

If you create a color picker, it must respond to the kDrawPicker request code. The Color Picker Manager sends this code in response to an update event. A color picker responds to the kDrawPicker request code by calling a color picker-defined subroutine (for example, MyDrawPicker) to handle the request.

pascal ComponentResult MyDrawPicker (PickerStorageHndl storage);
storage
A handle to your color picker's global data.
DISCUSSION
Your MyDrawPicker function should redraw your color picker. The Color Picker Manager calls the Event Manager function BeginUpdate before sending the kDrawPicker request code, and the Color Picker Manager calls the Event Manager function EndUpdate after sending the kDrawPicker request code.

Your function should return noErr if successful, or an appropriate result code otherwise.

SEE ALSO
Listing 2-20 (page 2-37) in Advanced Color Imaging on the Mac OS illustrates how to implement this function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996