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 Manager Functions / Using the Standard Color Picker Dialog Box


PickColor

Displays the standard color picker dialog box.

pascal OSErr PickColor (ColorPickerInfo *theColorInfo);
theColorInfo
A pointer to a color picker parameter block (page 2-20). On input, you specify information such as the location of the dialog box. On output, the parameter block specifies information such as whether the user has changed the color.
DISCUSSION
The PickColor function displays the standard, modal dialog box for color pickers. Use the color picker parameter block pointed to in the parameter theColorInfo to specify information to and obtain information from the Color Picker Manager.

When the user clicks the OK button, the PickColor function removes the dialog box and returns true in the newColorChosen field of the color picker parameter block pointed to by the theColorInfo parameter. The PickColor function also returns the user's selected color in the field theColor. When the user clicks the Cancel button, PickColor removes the dialog box and returns false in the newColorChosen field.

SEE ALSO
Listing 2-1 in Advanced Color Imaging on the Mac OS illustrates how to use the PickColor function. If your application needs to display color pickers in a dialog box other than the standard modal dialog box, your application must use the Color Picker Manager low-level functions, as described in "Using Customized Dialog Boxes for Color Pickers" (page 2-10) in Advanced Color Imaging on the Mac OS.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996