Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

PATHDocumentation > Mac OS 8 and 9 > Human Interface Toolbox > Control Manager >

Mac OS 8 Control Manager Reference


Control Data Tag Constants

You can use the control data tag constants to set or obtain data that is associated with a control. The control data tag constants are passed in the inTagName parameters of SetControlData and GetControlData to specify the piece of data in a control that you wish to set or get. You can also pass these constants in the inTagName parameter of GetControlDataSize if you wish to determine the size of variable-length control data (e.g., text in an editable text control). These constants can also be used by custom control definition functions that return the feature bit kControlSupportsDataAccess in response to a kControlMsgGetFeatures message. The control data tag constants are available with Appearance Manager 1.0 and later.

The data that your application sets or obtains can be of various types, dependent upon the control. Therefore, the descriptions of the control data tag constants list the data types for the information that you can set in the inData parameter to the SetControlData function and that you can get in the inBuffer parameter to the GetControlData function.

enum {
    kControlPushButtonDefaultTag            = ('dflt'),
    kControlBevelButtonContentTag           = ('cont'),
    kControlBevelButtonTransformTag         = ('tran'),
    kControlBevelButtonTextAlignTag         = ('tali'),
    kControlBevelButtonTextOffsetTag        = ('toff'),
    kControlBevelButtonGraphicAlignTag      = ('gali'),
    kControlBevelButtonGraphicOffsetTag     = ('goff'),
    kControlBevelButtonTextPlaceTag         = ('tplc'),
    kControlBevelButtonMenuValueTag         = ('mval'),
    kControlBevelButtonMenuHandleTag        = ('mhnd'),
    kControlBevelButtonCenterPopupGlyphTag  = ('pglc'),
    kControlTriangleLastValueTag            = ('last'),
    kControlProgressBarIndeterminateTag     = ('inde'),
    kControlTabContentRectTag               = ('rect'),
    kControlTabEnabledFlagTag               = ('enab'),
    kControlTabInfoTag                      = ('tabi'),
    kControlGroupBoxMenuHandleTag           = ('mhan'),
    kControlImageWellContentTag             = ('cont'),
    kControlImageWellTransformTag           = ('tran'),
    kControlClockLongDateTag                = ('date'),
    kControlUserItemDrawProcTag             = ('uidp'),
    kControlUserPaneDrawProcTag             = ('draw'),
    kControlUserPaneHitTestProcTag          = ('hitt'),
    kControlUserPaneTrackingProcTag         = ('trak'),
    kControlUserPaneIdleProcTag             = ('idle'),
    kControlUserPaneKeyDownProcTag          = ('keyd'),
    kControlUserPaneActivateProcTag         = ('acti'),
    kControlUserPaneFocusProcTag            = ('foci'),
    kControlUserPaneBackgroundProcTag       = ('back'),
    kControlEditTextTextTag                 = ('text'),
    kControlEditTextTEHandleTag             = ('than'),
    kControlEditTextSelectionTag            = ('sele'),
    kControlEditTextPasswordTag             = ('pass'),
    kControlStaticTextTextTag               = ('text'),
    kControlStaticTextTextHeightTag         = ('thei'),
    kControlIconTransformTag                = ('trfm'),
    kControlIconAlignmentTag                = ('algn'),
    kControlListBoxListHandleTag            = ('lhan'),
    kControlFontStyleTag                    = ('font'),
    kControlKeyFilterTag                    = ('fltr'),
    kControlBevelButtonLastMenuTag          = ('lmnu'),
    kControlBevelButtonMenuDelayTag         = ('mdly'),
    kControlPopupButtonMenuHandleTag        = ('mhan'),
    kControlPopupButtonMenuIDTag            = ('mnid'),
    kControlListBoxDoubleClickTag           = ('dblc'),
    kControlListBoxLDEFTag                  = ('ldef')
};

Constant descriptions

kControlPushButtonDefaultTag
Tells Appearance-compliant button whether to draw a default ring, or returns whether the Appearance Manager draws a default ring for the button.
Data type returned or set: Maximum: Boolean
kControlBevelButtonContentTag
Gets or sets a bevel button's content type for drawing; see Bevel Button and Image Well Content Type Constants .
Data type returned or set: Maximum: ControlButtonContentInfo structure
kControlBevelButtonTransformTag
Gets or sets a transform that is added to the standard transform of a bevel button; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: Maximum: IconTransformType
kControlBevelButtonTextAlignTag
Gets or sets the alignment of text in a bevel button; see Bevel Button Text Alignment Constants .
Data type returned or set: Maximum: ControlButtonTextAlignment
kControlBevelButtonTextOffsetTag
Gets or sets the number of pixels that text is offset in a bevel button from the button's left or right edge; this is used with left, right, or system justification, but it is ignored when the text is center aligned.
Data type returned or set: Maximum: SInt16
kControlBevelButtonGraphicAlignTag
Gets or sets the alignment of graphics in a bevel button in relation to any text the button may contain; see Bevel Button Graphic Alignment Constants .
Data type returned or set: Maximum: ControlButtonGraphicAlignment
kControlBevelButtonGraphicOffsetTag
Gets or sets the horizontal and vertical amounts that a graphic element contained in a bevel button is offset from the button's edges; this value is ignored when the graphic is specified to be center aligned on the button. Note that offset values should not be used for bevel buttons with content of type kControlContentIconRef , because IconRef based icons may change with a theme switch; see Bevel Button and Image Well Content Type Constants .
Data type returned or set: Maximum: point
kControlBevelButtonTextPlaceTag
Gets or sets the placement of a bevel button's text; see Bevel Button Text Placement Constants .
Data type returned or set: Maximum: ControlButtonTextPlacement
kControlBevelButtonMenuValueTag
Gets the menu value for a bevel button with an attached menu; see Bevel Button Menu Constants .
Data type returned: SInt16
kControlBevelButtonMenuHandleTag
Gets or sets the menu handle for a bevel button with an attached menu. To set a non-resource-based menu for a bevel button, you must pass in a non-zero value in the initialValue parameter of the NewControl function, then call the SetControlData function with the kControlBevelButtonMenuHandleTag constant and the return value from a call to the NewMenu function.
Data type returned: MenuHandle
kControlBevelButtonCenterPopUpGlyphTag
Gets or sets the position of the pop-up arrow in a bevel button when a pop-up menu is attached.
Data type returned or set: Maximum: Boolean ; if true , glyph is vertically centered on the right; if false , glyph is on the bottom right.
kControlTriangleLastValueTag
Gets or sets the last value of a disclosure triangle. Used primarily for setting up a disclosure triangle properly when using the auto-toggle variant.
Data type returned or set: Maximum: SInt16
kControlProgressBarIndeterminateTag
Gets or sets whether a progress indicator is determinate or indeterminate.
Data type returned or set: Maximum: Boolean ; if true , switches to an indeterminate progress indicator; if false , switches to an determinate progress indicator.
kControlTabContentRectTag
Gets the content rectangle of a tab control.
Data type returned: Rect
kControlTabEnabledFlagTag
Enables or disables a single tab in a tab control.
Data type returned or set: Maximum: Boolean ; if true , enabled; if false , disabled.
kControlTabInfoTag
Gets or sets information for a tab in a tab control; see ControlTabInfoRec . Available with Appearance 1.0.1 and later.
Data type returned or set: Maximum: ControlTabInfoRec .
kControlGroupBoxMenuHandleTag
Gets the menu handle of a group box.
Data type returned: MenuHandle
kControlImageWellContentTag
Gets or sets the content for an image well; see ControlButtonContentInfo .
Data type returned or set: Maximum: ControlButtonContentInfo structure
kControlImageWellTransformTag
Gets or sets a transform that is added to the standard transform of an image well; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: Maximum: IconTransformType
kControlClockLongDateTag
Gets or sets the clock control's time or date.
Data type returned or set: Maximum: LongDateRec structure
kControlUserItemDrawProcTag
Gets or sets an application-defined item drawing function. If an embedding hierarchy is established, a user pane drawing function should be used instead of an item drawing function.
Data type returned or set: Maximum: UserItemUPP
kControlUserPaneDrawProcTag
Gets or sets a user pane drawing function; see MyUserPaneDrawProc . Indicates that the Control Manager needs to draw a control.
Data type returned or set: Maximum: ControlUserPaneDrawingUPP
kControlUserPaneHitTestProcTag
Gets or sets a user pane hit-testing function. Indicates that the Control Manager needs to determine if a control part was hit; see MyUserPaneHitTestProc .
Data type returned or set: Maximum: ControlUserPaneHitTestUPP
kControlUserPaneTrackingProcTag
Gets or sets a user pane tracking function, which will be called when a control definition function returns the kControlHandlesTracking feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane handles its own tracking; see MyUserPaneTrackingProc .
Data type returned or set: Maximum: ControlUserPaneTrackingUPP
kControlUserPaneIdleProcTag
Gets or sets a user pane idle function, which will be called when a control definition function returns the kControlWantsIdle feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane performs idle processing; see MyUserPaneIdleProc .
Data type returned or set: Maximum: ControlUserPaneIdleUPP
kControlUserPaneKeyDownProcTag
Gets or sets a user pane key down function, which will be called when a control definition function returns the kControlSupportsFocus feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane performs keyboard event processing; see MyUserPaneKeyDownProc .
Data type returned or set: Maximum: ControlUserPaneKeyDownUPP
kControlUserPaneActivateProcTag
Gets or sets a user pane activate function, which will be called when a control definition function returns the kControlWantsActivate feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane wants to be informed of activate and deactivate events; see MyUserPaneActivateProc .
Data type returned or set: Maximum: ControlUserPaneActivateUPP
kControlUserPaneFocusProcTag
Gets or sets a user pane keyboard focus function, which will be called when a control definition function returns the kControlSupportsFocus feature bit in response to a kControlMsgGetFeatures message. Indicates that a user pane handles keyboard focus; see MyUserPaneFocusProc .
Data type returned or set: Maximum: ControlUserPaneFocusUPP
kControlUserPaneBackgroundProcTag
Gets or sets a user pane background function, which will be called when a control definition function returns the kControlHasSpecialBackground and kControlSupportsEmbedding feature bits in response to a kControlMsgGetFeatures message. Indicates that a user pane can set its background color or pattern; see MyUserPaneBackgroundProc .
Data type returned or set: Maximum: ControlUserPaneBackgroundUPP
kControlEditTextTextTag
Gets or sets text in an editable text control.
Data type returned or set: Maximum: character buffer
kControlEditTextTEHandleTag
Gets a handle to a text edit structure.
Data type returned: TEHandle
kControlEditTextSelectionTag
Gets or sets the selection in an editable text control.
Data type returned or set: Maximum: ControlEditTextSelectionRec structure
kControlEditTextPasswordTag
Gets clear password text from an editable text control, that is, the text of the actual password typed, not the bullet text.
Data type returned: character buffer
kControlStaticTextTextTag
Gets or sets text in a static text control.
Data type returned or set: Maximum: character buffer
kControlStaticTextTextHeightTag
Gets the height of text in a static text control.
Data type returned or set: Maximum: SInt16
kControlIconTransformTag
Gets or sets a transform that is added to the standard transform of an icon; see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: Maximum: IconTransformType
kControlIconAlignmentTag
Gets or sets an icon's position (centered, left, right); see "Icon Utilities" in More Macintosh Toolbox.
Data type returned or set: Maximum: IconAlignmentType
kControlListBoxListHandleTag
Gets a handle to a list box.
Data type returned: ListHandle
kControlFontStyleTag
Gets or sets the font style for controls that support text (includes list box, tab, clock, static and editable text).
Data type returned or set: Maximum: kControlFontStyleTag
kControlKeyFilterTag
Gets or sets the key filter function for controls that handle filtered input (includes editable text and list box).
Data type returned or set: Maximum: ControlKeyFilterUPP
kControlBevelButtonLastMenuTag
Gets the menu ID of the last menu selected in the submenu or main menu. Available with Appearance 1.0.1 and later.
Data type returned: SInt16
kControlBevelButtonMenuDelayTag
Gets or sets the delay (in number of ticks) before the menu is displayed. Available with Appearance 1.0.1 and later.
Data type returned or set: Maximum: SInt32
kControlPopupButtonMenuHandleTag
Gets or sets the menu handle for a pop-up menu. Available with Appearance 1.0.1 and later.
Data type returned or set: Maximum: MenuHandle
kControlPopupButtonMenuIDTag
Gets or sets the menu ID for a pop-up menu. Available with Appearance 1.0.1 and later.
Data type returned or set: Maximum: SInt16
kControlListBoxDoubleClickTag
Checks to see whether the most recent click in a list box was a double click. Available with Appearance 1.0.1 and later.
Data type returned: Boolean ; if true , the last click was a double click; if false , not.
kControlListBoxLDEFTag
Sets the 'LDEF' resource to be used to draw a list box's contents; this is useful for creating a list box without an 'ldes' resource. Available with Appearance 1.0.1 and later.
Data type set: SInt16

\xA9 1998 Apple Computer, Inc. – (Last Updated 19 Nov 98)