Carbon


PickerEditProcPtr

Header: ColorPickerComponents.h Carbon status: Supported

Defines a pointer to a color picker-defined edit event handler callback function. Your edit event handler function handles an editing command.

typedef ComponentResult(* PickerEditProcPtr) (
    SInt32 storage, 
    PickerEditData *data
);

You would declare your function like this if you were to name it MyPickerEditCallback:

ComponentResult MyPickerEditCallback (
    SInt32 storage, 
    PickerEditData *data
);
Parameter descriptions
storage

A handle to your color picker’s global data.

data

A pointer to an EditData structure. The editing command is passed to your function in the field theEdit of the EditData structure.

function result

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

DISCUSSION

If you create a color picker, it must respond to the kEdit request code, by calling a color picker-defined subroutine (MyPickerEditCallback, for example).

If your color picker needs to handle an editing command instead of allowing the Dialog Manager to handle it, your MyPickerEditCallback function should perform it. For example, because the Dialog Manager does not handle the Undo command, your MyPickerEditCallback function can handle it instead.

If your function handles the command, it should set the handled field of the EditData structure to true, in which case the Dialog Manager performs no additional processing of the associated event. If your function sets the handled field to false, then the Color Picker Manager sends your color picker the kItemHit request code with the appropriate information regarding the event in the editable-text item.

When you create a color picker, the Color Picker Manager uses the Component Manager to request services from your color picker. The code for your color picker should be contained in a resource. The Component Manager expects that the entry point into this resource is a color picker-defined dispatch function. For information on how to create this dispatch function, see the Component Manager callback, ComponentRoutineProcPtr.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)