Carbon


Pre–Appearance Control Definition IDs

Header: ControlDefinitions.h

enum {
    pushButProc = ,
    checkBoxProc = 1,
    radioButProc = 2,
    scrollBarProc = 16,
    popupMenuProc = 1008
};

Constant descriptions

pushButProc

Resource ID: 0

Pre-Appearance push button.

pushButProc + kControlUsesOwningWindowsFontVariant:

Resource ID: 0

Pre-Appearance push button with its text in the window font.

checkBoxProc

Resource ID: 0

Pre-Appearance checkbox.

checkBoxProc + kControlUsesOwningWindowsFontVariant:

Resource ID: 0

Pre-Appearance checkbox with a control title in the window font.

radioButProc

Resource ID: 0

Pre-Appearance radio button.

radioButProc + kControlUsesOwningWindowsFontVariant:

Resource ID: 0

Pre-Appearance radio button with a title in the window font.

scrollBarProc

Resource ID: 0

Pre-Appearance scroll bar.

popupMenuProc

Resource ID: 63

Pre-Appearance standard pop-up menu.

popupMenuProc + popupFixedWidth:

Resource ID: 63; Control Definition ID: 1009

Pre-Appearance, fixed-width pop-up menu.

popupMenuProc + popupVariableWidth

Resource ID: 63; Control Definition ID: 1010

Pre-Appearance, variable-width pop-up menu.

popupMenuProc + popupUseAddResMenu

Resource ID: 63; Control Definition ID: 1012

Pre-Appearance pop-up menu with a value of type ResType in the contrlRfCon field of the control structure. The Menu Manager adds resources of this type to the menu.

popupMenuProc + popupUseWFont

Resource ID: 63; Control Definition ID: 1016

Pre-Appearance pop-up menu with a control title in the window font.

When creating a control, your application supplies a control definition ID to one of the Control Manager control-creation functions or to the control resource; see 'CNTL'. The control definition ID indicates the type of control to create. A control definition ID is an integer that contains the resource ID of a control definition function in its upper 12 bits and a variation code in its lower 4 bits. A control definition ID is derived as follows:

control definition ID = 16 * ('CDEF' resource ID) + variation code

A control definition function determines how a control generally looks and behaves. Control definition functions are stored as resources of type 'CDEF'. Various Control Manager functions call a control definition function whenever they need to perform some control-dependent action, such as drawing the control on the screen. For more information on how to create a control definition function, see “Defining Your Own Control Definition Function”.

A control definition function, in turn, can use a variation code to describe variations of the same basic control. For example, all pop-up arrows share the same basic control definition function, which is stored in a resource of type 'CDEF' and has a resource ID of 12. The standard pop-up arrow is large and points to the right; it has a control definition ID of 192. A variation of this is a large, left-pointing arrow, which has a control definition ID of 193. Still another variation, in which the arrow points up, has a control definition ID of 194.

Your application can use the constants listed here in place of control definition IDs.

If your application contains code that uses the older, pre-Appearance control definition IDs or their constants, your application can use the Appearance Manager to map the old IDs to those for the new, updated controls introduced by the Appearance Manager. In particular, the control definition IDs for pre-Appearance checkboxes, buttons, scroll bars, radio buttons, and pop-up menus will be automatically mapped to Appearance-compliant equivalents.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)