Important: The information in this document is obsolete and should not be used for new development.
PATH![]() |
![]() ![]() |
You can use constants of type ControlContentType
in the contentType
field of the ControlButtonContentInfo
structure to display various kinds of
bevel button and
image well content, including text, icons, and pictures. The ControlContentType
constants are available with Appearance Manager 1.0 and later, except as noted.
The resource IDs for icon suite, color icon, and picture resources are passed in the maximumValue
parameter of NewControl
or in a control
resource; see 'CNTL'
. The content type is passed in the low byte of the minimumValue
parameter of NewControl
.
Note
Resource-based content is owned by the control, while handle-based content is owned by you. The control definition function will not dispose of handle-based content. If you replace handle-based content with resource-based content on the fly, you must dispose of the handle properly to avoid a memory leak.
enum {
kControlContentTextOnly = 0,
kControlContentIconSuiteRes = 1,
kControlContentCIconRes = 2,
kControlContentPictRes = 3,
kControlContentIconSuiteHandle = 129,
kControlContentCIconHandle = 130,
kControlContentPictHandle = 131,
kControlContentIconRef = 132
};
typedef SInt16 ControlContentType;
kControlContentTextOnly
ControlButtonContentInfo
structure if the content is text only. The variation code kControlUsesOwningWindowsFontVariant
applies when text content is used. kControlContentIconSuiteRes
resID
field of the ControlButtonContentInfo
structure. kControlContentCIconRes
resID
field of the ControlButtonContentInfo
structure.kControlContentPictRes
resID
field of the ControlButtonContentInfo
structure.kControlContentIconSuiteHandle
iconSuite
field of the ControlButtonContentInfo
structure.kControlContentCIconHandle
cIconHandle
field of the ControlButtonContentInfo
structure.kControlContentPictHandle
picture
field of the ControlButtonContentInfo
structure.kControlContentIconRef
IconRef
. An IconRef
value for the icon you wish to display should be provided in the iconRef
field of the ControlButtonContentInfo
structure. Note that the kControlBevelButtonGraphicOffsetTag
control data tag constant should not be used with IconRef
based bevel button content, because IconRef
based icons may change with a theme switch; see Control Data Tag Constants
. Supported with Mac OS 8.5 and later.