Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Appendix A - Newton Toolkit Enhancements / Functions
/


MakeExtrasIcons

MakeExtrasIcons(iconRsrcSpecs,unhilitedMaskRsrcSpec,hilitedMaskRsrcSpec)

Creates a frame with an iconPro, and optionally, an icon slot; these slots can be copied to a part frame.

iconRsrcSpecs
An array of frames with the following format:

unhilitedRsrcSpec String for the name of a PICT resource to use as the normal icon.

hilitedRsrcSpec Optional. String for the name of a PICT resource for highlighted icon.

bitDepth Optional. Integer indicating resource's bit depth. The allowable values are 1, 2, 4, and 8.

If you do not specify a bit depth for a particular PICT, the bit depth is determined automatically from the PICT resource. If you want the icon to be included in your project at a particular bit depth, you should specify it explicitly.

Note
All the PICTs provided in this array must be of the same size.
unhilitedMaskRsrcSpec
String for the name of a black and white PICT to be the mask for normal icon.

hilitedMaskRsrcSpec
String for the name of the black and white PICT to be a mask for the highlighted icon, or nil if no highlighted icon is provided.

return value
A frame with an iconPro slot, and if 1-bit information is provided in iconRsrcSpecs, an icon slot. These slots can be copied to a part frame.

DISCUSSION

If the iconRsrcSpecs array contains more than one icon, the system determines the appropriate one for the current hardware.

The resource names are for named PICT resources within any resource file included in the current project. If more than one PICT is used, then all the PICTs must have the same size bounds, or this function will throw. This includes all the PICTs referred to in the iconRsrcSpecs, unhilitedMaskRsrcSpec, and hilitedMaskRsrcSpec parameters.

SEE ALSO

The Project Settings dialog provides an editor to use for an application's part's icon; see "Application Icon Editor". You must use *MakeExtrasIcons to create icons for other types of parts.

For an example of using this function, see Listing 6-1.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help