Carbon


Bevel Button Control Data Tag Constants

Header: ControlDefinitions.h

enum {
    kControlBevelButtonContentTag = ''cont'',
    kControlBevelButtonTransformTag = ''tran'',
    kControlBevelButtonTextAlignTag = ''tali'',
    kControlBevelButtonTextOffsetTag = ''toff'',
    kControlBevelButtonGraphicAlignTag = ''gali'',
    kControlBevelButtonGraphicOffsetTag = ''goff'',
    kControlBevelButtonTextPlaceTag = ''tplc'',
    kControlBevelButtonMenuValueTag = ''mval'',
    kControlBevelButtonMenuHandleTag = ''mhnd'',
    kControlBevelButtonMenuRefTag = ''mhnd'',
    kControlBevelButtonCenterPopupGlyphTag = ''pglc''
};

Constant descriptions

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: ControlButtonContentInfo structure

kControlBevelButtonTransformTag

Gets or sets a transform that is added to the standard transform of a bevel button

Data type returned or set: IconTransformType

kControlBevelButtonTextAlignTag

Gets or sets the alignment of text in a bevel button; see “Bevel Button Text Alignment Constants”.

Data type returned or set: 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: 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: 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: point

kControlBevelButtonTextPlaceTag

Gets or sets the placement of a bevel button’s text; see “Bevel Button Text Placement Constants”.

Data type returned or set: ControlButtonTextPlacement

kControlBevelButtonMenuValueTag

Gets the menu value for a bevel button with an attached menu; see “Bevel Button Menu Constant”.

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

kControlBevelButtonMenuRefTag
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: Boolean; if true, glyph is vertically centered on the right; if false, glyph is on the bottom right.

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. These constants can also be used by custom control definition functions that return the feature bit kControlSupportsDataAccess in response to a kControlMsgGetFeatures message.

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.

VERSION NOTES

The control data tag constants are available with Appearance Manager 1.0 and later.


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