Carbon


Control Definition Message Constants

Header: Controls.h

The Control Manager passes constants of type ControlDefProcMessage to Indicate the action your control definition function must perform.

enum {
    drawCntl = 0,
    testCntl = 1,
    calcCRgns = 2,
    initCntl = 3,
    dispCntl = 4,
    posCntl = 5,
    thumbCntl = 6,
    dragCntl = 7,
    autoTrack = 8,
    calcCntlRgn = 10,
    calcThumbRgn = 11,
    drawThumbOutline = 12,
    kControlMsgDrawGhost = 13,
    kControlMsgCalcBestRect = 14,
    kControlMsgHandleTracking = 15,
    kControlMsgFocus = 16,
    kControlMsgKeyDown = 17,
    kControlMsgIdle = 18,
    kControlMsgGetFeatures = 19,
    kControlMsgSetData = 20,
    kControlMsgGetData = 21,
    kControlMsgActivate = 22,
    kControlMsgSetUpBackground = 23,
    kControlMsgCalcValueFromPos = 26,
    kControlMsgTestNewMsgSupport = 27,
    kControlMsgSubValueChanged = 25,
    kControlMsgSubControlAdded = 28,
    kControlMsgSubControlRemoved = 29,
    kControlMsgApplyTextColor = 30,
    kControlMsgGetRegion = 31,
    kControlMsgFlatten = 32,
    kControlMsgSetCursor = 33,
    kControlMsgDragEnter = 38,
    kControlMsgDragLeave = 39,
    kControlMsgDragWithin = 40,
    kControlMsgDragReceive = 41,
    kControlMsgDisplayDebugInfo = 46,
    kControlMsgContextualMenuClick = 47,
    kControlMsgGetClickActivation = 48
};

Constant descriptions

drawCntl

Draw the entire control or part of a control.

testCntl

Test where the mouse has been pressed.

calcCRgns

Calculate the region for the control or the indicator in 24-bit systems. This message is obsolete in Mac OS 7.6 and later.

initCntl

Perform additional control initialization.

dispCntl

Perform additional control disposal actions.

posCntl

Move and update the indicator setting.

thumbCntl

Calculate the parameters for dragging the indicator.

dragCntl

Perform customized dragging (of the control or its indicator).

autoTrack

Execute the specified action function.

calcCntlRgn

Calculate the control region in 32-bit systems.

calcThumbRgn

Calculate the indicator region in 32-bit systems.

drawThumbOutline
kControlMsgDrawGhost

Draw a ghost image of the indicator. Available with Appearance Manager 1.0 and later.

kControlMsgCalcBestRect

Calculate the optimal control rectangle. Available with Appearance Manager 1.0 and later.

kControlMsgHandleTracking

Perform custom tracking. Available with Appearance Manager 1.0 and later.

kControlMsgFocus

Handle keyboard focus. Available with Appearance Manager 1.0 and later.

kControlMsgKeyDown

Handle keyboard events. Available with Appearance Manager 1.0 and later.

kControlMsgIdle

Perform idle processing. Available with Appearance Manager 1.0 and later.

kControlMsgGetFeatures

Specify which Appearance-compliant messages are supported. Available with Appearance Manager 1.0 and later.

kControlMsgSetData

Set control-specific data. Available with Appearance Manager 1.0 and later.

kControlMsgGetData

Get control-specific data. Available with Appearance Manager 1.0 and later.

kControlMsgActivate

Handle activate and deactivate events. Available with Appearance Manager 1.0 and later.

kControlMsgSetUpBackground

Set the control’s background color or pattern (only available if the control supports embedding). Available with Appearance Manager 1.0 and later.

kControlMsgCalcValueFromPos

Support live feedback while dragging the indicator and calculate the control value based on the new indicator region. Available with Appearance Manager 1.0 and later.

kControlMsgTestNewMsgSupport

Specify whether Appearance-compliant messages are supported. Available with Appearance Manager 1.0 and later.

kControlMsgSubValueChanged

Be informed that the value of a subcontrol embedded in the control has changed; this message is useful for radio groups. Available with Appearance 1.0.1 and later.

kControlMsgSubControlAdded

Be informed that a subcontrol has been embedded in the control. Available with Appearance 1.0.1 and later.

kControlMsgSubControlRemoved

Be informed that a subcontrol is about to be removed from the control. Available with Appearance 1.0.1 and later.

kControlMsgApplyTextColor

Set the foreground color to be consistent with the current drawing environment and suitable for display against the background color or pattern. To indicate that your control definition function supports this message, set the kControlHasSpecialBackground feature bit. When this message is sent, the Control Manager passes a pointer to a structure of type ControlApplyTextColorRec in your control definition function’s param parameter. The Control Manager sets the ControlApplyTextColorRec structure to contain data describing the current drawing environment. Your control definition function is responsible for using this data to apply a text color which is consistent with the current theme and optimally readable on the control’s background. Your control definition function should return 0 as the function result.

kControlMsgGetRegion

Obtain the region occupied by the specified control part. To indicate that your control definition function supports this message, set the kControlSupportsGetRegion feature bit. When this message is sent, the Control Manager passes a pointer to a structure of type ControlGetRegionRec in your control definition function’s param parameter. Your control definition function is responsible for setting the region field of the ControlGetRegionRec structure to the region that contains the control part which the Control Manager specifies in the part field. Your control definition function return a result code of type OSStatus as the function result.

kControlMsgFlatten
kControlMsgSetCursor
kControlMsgDragEnter
kControlMsgDragLeave
kControlMsgDragWithin
kControlMsgDragReceive
kControlMsgDisplayDebugInfo
kControlMsgContextualMenuClick
kControlMsgGetClickActivation

The Control Manager may pass these constants in the message parameter of your control definition function to specify the actions that your function must perform. See ControlDefProcPtr.


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