MyDoEventColor picker-defined subroutine that handles a
If you create a color picker, it must respond to the
kEventrequest code. The Color Picker Manager sends this code so that your color picker can handle events that the Dialog Manager does not handle. A color picker responds to the
kEventrequest code by calling a color picker-defined subroutine (for example,
MyDoEvent) to handle the request.
pascal ComponentResult MyDoEvent ( PickerStorageHndl storage, EventData *data);
- A handle to your color picker's global data.
- A pointer to an
EventDatastructure (page 2-26).
DISCUSSIONIf your color picker needs to perform any event processing in addition to or instead of that normally performed by the Dialog Manager, your
MyDoEventfunction should perform it. The event is passed to your function in the event record pointed to in the
eventfield of the
EventDatastructure which, in turn, is pointed to in the
EventDatastructure pointed to in the
MyDoEventfunction returns information about any event handling it performs. If your function handles the event, it should set the value of the
true, in which case the Dialog Manager performs no additional handling of the event. Your function should set the
actionfield to the particular action it performed. The
colorProcfield may point to an application-defined function that your color picker should call.
Your function should return
noErrif successful, or an appropriate result code otherwise.
SEE ALSOListing 2-21 in Advanced Color Imaging on the Mac OS illustrates how to implement this function.