Important: The information in this document is obsolete and should not be used for new development.
MyDoEdit
Color picker-defined subroutine that handles akEdit
request.If you create a color picker, it must respond to the
kEdit
request code. The Color Picker Manager sends this code to inform your color picker that the user has chosen one of the edit commands from the Edit menu (or the user has typed a Command-key equivalent). A color picker responds to thekEdit
request code by calling a color picker-defined subroutine (for example,MyDoEdit
) to handle the request.
pascal ComponentResult MyDoEdit ( PickerStorageHndl storage, EditData *data);
storage
- A handle to your color picker's global data.
data
- A pointer to an
EditData
structure (page 2-29).DISCUSSION
If your color picker needs to handle an editing command instead of allowing the Dialog Manager to handle it, yourMyDoEdit
function should perform it. For example, because the Dialog Manager does not handle the Undo command, yourMyDoEdit
function can handle it instead. The editing command is passed to your function in the fieldtheEdit
of theEditData
structure pointed to in thedata
parameter.If your function handles the command, it should set the
handled
field of theEditData
structure totrue
, in which case the Dialog Manager performs no additional processing of the associated event. If your function sets thehandled
field tofalse
, then the Color Picker Manager sends your color picker thekItemHit
request code with the appropriate information regarding the event in the editable-text item.Your function should return
noErr
if successful, or an appropriate result code otherwise.SEE ALSO
Listing 2-23 (page 2-40) in Advanced Color Imaging on the Mac OS illustrates how to implement this function.