Carbon


PickerExtractHelpItemProcPtr

Header: ColorPickerComponents.h Carbon status: Supported

Defines a pointer to a color picker-defined help item getter callback function. Your help item getter function returns help messages or other help balloon characteristics from your color picker.

typedef ComponentResult(* PickerExtractHelpItemProcPtr) (
    SInt32 storage, 
    SInt16 itemNo, 
    SInt16 whichMsg, 
    PickerHelpItemInfo *helpInfo
);

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

ComponentResult MyPickerExtractHelpItemCallback (
    SInt32 storage, 
    SInt16 itemNo, 
    SInt16 whichMsg, 
    PickerHelpItemInfo *helpInfo
);
Parameter descriptions
storage

A handle to your color picker’s global data.

itemNo

A number corresponding to the position of an item in the item list resource of the color picker’s dialog box. The Help Manager is ready to display a help balloon for the item represented by this number.

whichMsg

For menu items and items in alert or dialog boxes, the state of the item specified in the itemNo parameter. The following constants are used to represent the possible states: kHMEnabledItem, kHMDisabledItem, kHMCheckedItem, and kHMOtherItem.

helpInfo

A pointer to a HelpItemInfo structure. In the helpMessage field of this structure, the Color Picker Manager passes the default help message in an HMHelpMessage structure; your MyPickerExtractHelpItemCallback function changes the help message by supplying a different HMHelpMessage structure for this field. The Color Picker Manager passes the default characteristics of the help balloon—that is, the value of the options element of its help resource, its tip location, its alternate rectangle, its tip function, and its variation code—in the rest of the fields of the HelpItemInfo structure, which your MyPickerExtractHelpItemCallback function can also change.

function result

If your color picker has no help balloons, it should return the noHelpForItem result code, and the Help Manager will display the default message and characteristics of the help balloon.

DISCUSSION

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

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)