![]() |
Bevel Button Behavior Constants |
Header: ControlDefinitions.h |
enum { kControlBehaviorPushbutton = , kControlBehaviorToggles = 256, kControlBehaviorSticky = 512, kControlBehaviorSingleValueMenu = 0, kControlBehaviorMultiValueMenu = 16384, kControlBehaviorOffsetContents = 32768 };
Push button (momentary) behavior. The bevel button pops up after being clicked.
Toggle behavior. The bevel button toggles state automatically when clicked.
Sticky behavior. Once clicked, the bevel button stays down until your application sets the controls value to 0. This behavior is useful in tool palettes and radio groups.
If this bit is set, the menus are multi-valued. The bevel button does not maintain the menu value as it normally would (requiring that only one item is selected at a time). This allows the user to toggle entries in a menu and have multiple items checked. In this mode, the menu value accessed with the kControlMenuLastValueTag will return the value of the last menu item selected.
Bevel button contents are offset (one pixel down and to the right) when button is pressed.
You can pass the bevel button behavior constants in the high byte of the minimumValue parameter of NewControl to create a bevel button with a specific behavior.
You can pass the bevel button menu constant, kControlBehaviorMultiValueMenu, in the high byte of the minimumValue parameter of NewControl to create a bevel button with a menu of a certain behavior. Bevel buttons with menus have two values: the value of the button and the value of the menu. You can specify the direction of the pop-up menu arrow (down or right) by using the kControlBevelButtonMenuOnRight bevel button variant.
The bevel button behavior constants and the bevel button menu constant are available with Appearance Manager 1.0 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)