Important: The information in this document is obsolete and should not be used for new development.
MyDoEvent
Color picker-defined subroutine that handles akEventrequest.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 thekEventrequest code by calling a color picker-defined subroutine (for example,MyDoEvent) to handle the request.
pascal ComponentResult MyDoEvent ( PickerStorageHndl storage, EventData *data);
storage- A handle to your color picker's global data.
data- A pointer to an
EventDatastructure (page 2-26).DISCUSSION
If your color picker needs to perform any event processing in addition to or instead of that normally performed by the Dialog Manager, yourMyDoEventfunction should perform it. The event is passed to your function in the event record pointed to in theeventfield of theEventDatastructure which, in turn, is pointed to in thedataparameter.In the
EventDatastructure pointed to in thedataparameter, yourMyDoEventfunction returns information about any event handling it performs. If your function handles the event, it should set the value of thehandledfield totrue, in which case the Dialog Manager performs no additional handling of the event. Your function should set theactionfield to the particular action it performed. ThecolorProcfield 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 ALSO
Listing 2-21 in Advanced Color Imaging on the Mac OS illustrates how to implement this function.