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: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference
Resources


The Color Icon Resource

When you want to display a color icon within some element of your application (such as within a menu, an alert box, or a dialog box), you can create a color icon resource. A color icon resource is a resource of type 'cicn'. All color icon resources must be marked purgeable, and they must have resource IDs greater than 128. The 'cicn' resource was introduced with early versions of Color QuickDraw and is described here for completeness.

Using color icon resources, you can create icons similar to the ones that the Finder uses to display your application's files on the desktop; however, the Finder does not use or display any resources that you create of type 'cicn'. Instead, your application uses icon resources of type 'cicn' to display icons from within your application. (For information about the small and large 4-bit and 8-bit color icon resources--types 'ics4', 'icl4', 'ics8', and 'icl8'--necessary to define an icon family for the Finder's use, see Inside Macintosh: Macintosh Toolbox Essentials.)

Generally, you use color icon resources in menus, alert boxes, and dialog boxes, as described in the chapters "Menu Manager" and "Dialog Manager" in Inside Macintosh: Macintosh Toolbox Essentials. If you provide a color icon ('cicn') resource with the same resource ID as an icon ('ICON') resource, the Menu Manager and the Dialog Manager display the color icon instead of the black-and-white icon for users with color monitors. For information about drawing color icons without the aid of the Menu Manager or Dialog Manager (for example, to draw an icon in a window), see the chapter "Icon Utilities" in Inside Macintosh: More Macintosh Toolbox.

You can use a high-level tool such as the ResEdit application to create color icon resources. You can then use the DeRez decompiler to convert your color icon resources into Rez input when necessary.

The compiled output format for a 'cicn' resource is illustrated in Figure 4-18.

Figure 4-18 Format of a compiled color icon ('cicn') resource


The compiled version of a 'cicn' resource contains the following elements:

See the chapter "Icon Utilities" in Inside Macintosh: More Macintosh Toolbox for information about Macintosh Toolbox routines available to help you display icons.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996