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 /
Constants and Data Types


Request Codes

When a color picker receives a request code from the Component Manager, the color picker determines the nature of the request, performs the appropriate processing, sets an error code if necessary, and returns an appropriate function result to the Component Manager. These request codes are defined by the PickerMessages enumeration.

typedef enum {       /* request codes handled by a color picker 
*/
   kInitPicker,      /* initialize any private data */
   kTestGraphicsWorld,/* test operability on current system */
   kGetDialog,       /* if using own dialog box, return a 
pointer 
                        to the dialog box; if using the default 
                        dialog box, return nil */
   kGetItemList,     /* return a list of items for dialog box */
   kGetColor,        /* return original or last chosen color */
   kSetColor,        /* change original or last chosen color */
   kEvent,           /* perform any special processing necessary 
                        for an event */
   kEdit,            /* perform an editing command */
   kSetVisibility,   /* make color picker visible or invisible 
*/
   kDrawPicker,      /* redraw color picker */
   kItemHit,         /* respond to event in a dialog box item */
   kSetBaseItem,     /* set base item for dialog box items */
   kGetProfile,      /* return a handle to the destination 
color-
                        matching profile */
   kSetProfile,      /* change the destination color-matching 
                        profile */
   kGetPrompt,       /* return prompt string */
   kSetPrompt,       /* set a new prompt */
   kGetIconData,     /* return script code and resource ID of 
                        icon family */
   kGetEditMenuState,/* return information about Edit menu */
   kSetOrigin,       /* update any information about local 
                        coordinate system of dialog box */
   kExtractHelpItem  /* return information about help balloons 
*/
} PickerMessages;
Enumerator descriptions

kInitPicker
After receiving this request code, a color picker initializes any private data that it needs. See MyInitPicker (page 2-61) for more information about how a color picker should respond to this request code.
kTestGraphicsWorld
After receiving this request code, a color picker determines whether it can operate on the user's system. See MyTestGraphicsWorld (page 2-60) for more information about how a color picker should respond to this request code.
kGetDialog
After receiving this request code, a color picker returns nil if it uses the default dialog box, or it returns a pointer to its own dialog box. See MyGetDialog (page 2-62) for more information about how a color picker should respond to this request code.
kGetItemList
After receiving this request code, a color picker returns a list of items for display in a color picker dialog box. See MyGetItemList (page 2-62) for more information about how a color picker should respond to this request code.
kGetColor
After receiving this request code, a color picker returns a color--either the original color for the color picker or the new color selected by the user. See MyGetColor (page 2-64) for more information about how a color picker should respond to this request code.
kSetColor
After receiving this request code, a color picker sets either the original color or the new color. See MySetColor (page 2-65) for more information about how a color picker should respond to this request code.
kEvent
After receiving this request code, a color picker performs any special processing for an event. See MyDoEvent (page 2-75) for more information about how a color picker should respond to this request code.
kEdit
After receiving this request code, a color picker performs an editing command or lets the Dialog Manager handle the command. See MyDoEdit (page 2-78) for more information about how a color picker should respond to this request code.
kSetVisibility
After receiving this request code, a color picker changes its visibility. See MySetVisibility (page 2-63) for more information about how a color picker should respond to this request code.
kDrawPicker
After receiving this request code, a color picker redraws itself. See MyDrawPicker (page 2-75) for more information about how a color picker should respond to this request code.
kItemHit
After receiving this request code, a color picker responds to an event in a dialog box item. See MyItemHit (page 2-77) for more information about how a color picker should respond to this request code.
kSetBaseItem
After receiving this request code, a color picker sets the base item for dialog box items. See MySetBaseItem (page 2-66) for more information about how a color picker should respond to this request code.
kGetProfile
After receiving this request code, a color picker returns a handle to its destination color-matching profile. See MyGetProfile (page 2-70) for more information about how a color picker should respond to this request code.
kSetProfile
After receiving this request code, a color picker changes its destination color-matching profile. See MySetProfile (page 2-71) for more information about how a color picker should respond to this request code.
kGetPrompt
After receiving this request code, a color picker returns its prompt string. See MyGetPrompt (page 2-68) for more information about how a color picker should respond to this request code.
kSetPrompt
After receiving this request code, a color picker sets its prompt string. See MySetPrompt (page 2-69) for more information about how a color picker should respond to this request code.
kGetIconData
After receiving this request code, a color picker returns its script code and the resource ID of its icon family. See MyGetIconData (page 2-67) for more information about how a color picker should respond to this request code.
kGetEditMenuState
After receiving this request code, a color picker returns information about its edit menu. See MyGetEditMenuState (page 2-73) for more information about how a color picker should respond to this request code.
kSetOrigin
After receiving this request code, a color picker updates any information it maintains about the local coordinate system of its dialog box. See MySetOrigin (page 2-70) for more information about how a color picker should respond to this request code.
kExtractHelpItem
After receiving this request code, a color picker returns information about its help balloons. See MyExtractHelpItem (page 2-73) for more information about how a color picker should respond to this request code.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996