Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Color Picker-Defined Functions / Responding to Requests to Return and Set Color Picker Information


MyExtractHelpItem

Color picker-defined subroutine that handles a kExtractHelpItem request.

If you create a color picker, it must respond to the kExtractHelpItem request code. The Color Picker Manager sends this code to obtain help messages or other help balloon characteristics from your color picker. A color picker responds to the kExtractHelpItem request code by calling a color picker-defined subroutine (for example, MyExtractHelpItem) to handle the request.

pascal ComponentResult MyExtractHelpItem (
PickerStorageHndl storage,
short itemNo, 
short whichState,
HelpItemInfo *helpInfo);
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.
whichState
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 (page 2-32). In the helpMessage field of this structure, the Color Picker Manager passes the default help message in an HMHelpMessage structure; your MyExtractHelpItem function changes the help message by supplying a different HMHelpMessage structure (described in the chapter "Help Manager" in Inside Macintosh: More Macintosh Toolbox) 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 MyExtractHelpItem function can also change.
DISCUSSION
Your MyExtractHelpItem function should return information about your color picker's help balloons. 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996