Important: The information in this document is obsolete and should not be used for new development.
MyIconGetter
Here is the syntax of an icon getter function:
FUNCTION MyIconGetter (theType: ResType; yourDataPtr: Ptr): Handle;
theType
- The resource type of the icon.
yourDataPtr
- If your icon getter was called by an icon cache routine, this parameter contains a pointer to the data associated with the icon cache. Otherwise, this parameter contains the value your application specified in the
yourDataPtr
parameter. For icon caches, you initially set this value when you first create a cache usingMakeIconCache
. You can change this value usingSetIconCacheData
. The icon getter function can use this data as needed.DESCRIPTION
An icon getter function should return as its function result a handle to the requested icon's data.The
MakeIconCache
function takes a pointer to an icon getter function for use with a new icon cache. To get and set an existing icon cache's icon getter function, use theGetIconCacheProc
andSetIconCacheProc
functions. You can also specify an icon getter function for use by thePlotIconMethod
,IconMethodToRgn
,PtInIconMethod
, andRectInIconMethod
functions.SEE ALSO
For descriptions of theMakeIconCache
,GetIconCacheProc
, andSetIconCacheProc
functions, see "Working With Icon Caches" beginning on page 5-53.For information on the
PlotIconMethod
function, see page 5-22. For a description of theIconMethodToRgn
function, see "Converting an Icon Mask to a Region" beginning on page 5-43.For descriptions of the
PtInIconMethod
andRectInIconMethod
functions, see "Determining Whether a Point or Rectangle Is Within an Icon" beginning on page 5-46.