haiku/docs/user/interface/InterfaceDefs.dox
2014-12-19 19:58:14 -05:00

353 lines
5.6 KiB
Plaintext

/*
* Copyright 2011-2013 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, jscipione@gmail.com
*
* Corresponds to:
* headers/os/interface/InterfaceDefs.h hrev45737
* src/kits/interface/InterfaceDefs.cpp hrev45737
*/
/*!
\file InterfaceDefs.h
\ingroup interface
\ingroup libbe
\brief Defines standard interface definitions for controls.
\since BeOS R3
*/
/*!
\enum border_style
\ingroup interface
Collection of flags that determine the border style drawn around a BBox.
\since BeOS R3
*/
/*!
\var border_style B_PLAIN_BORDER
\image html B_PLAIN_BORDER.png
The right and bottom sides of the box are darker than the top and
left sides to produce a shadow effect and make the box look like it
is raised slightly above the surrounding surface.
\since BeOS R3
*/
/*!
\var border_style B_FANCY_BORDER
\image html B_FANCY_BORDER.png
The border is a bevelled to give it a 3D effect. The border is uniform
in appearance on all four sides. This is the default appearance.
\since BeOS R3
*/
/*!
\var border_style B_NO_BORDER
No border.
\since BeOS R3
*/
/*!
\enum orientation
Orientation flag sets the layout to either horizontal or vertical
alignment.
\since BeOS R3
*/
/*!
\var orientation B_HORIZONTAL
Horizontal alignment
*/
\since BeOS R3
/*!
\var orientation B_VERTICAL
Vertical alignment
\since BeOS R3
*/
/*!
\enum button_width
Collection of flags that determine how wide to draw the buttons in a
BAlert dialog.
\since BeOS R3
*/
/*!
\var button_width B_WIDTH_AS_USUAL
Set the width of each button based on the standard width.
\since BeOS R3
*/
/*!
\var button_width B_WIDTH_FROM_WIDEST
Set the width of each button based on the width of the widest button.
\since BeOS R3
*/
/*!
\var button_width B_WIDTH_FROM_LABEL
Set the width of each button to accommodate the label.
\since BeOS R5
*/
// Line join and cap modes
/*!
\enum join_mode
PostScript-style line join modes used by BView::SetLineMode()
\since BeOS R3
*/
/*!
\var join_mode B_ROUND_JOIN
Round join mode.
\since BeOS R3
*/
/*!
\var join_mode B_MITER_JOIN
Miter join mode.
\since BeOS R3
*/
/*!
\var join_mode B_BEVEL_JOIN
Bevel join mode.
\since BeOS R3
*/
/*!
\var join_mode B_BUTT_JOIN
Butt join mode.
\since BeOS R3
*/
/*!
\var join_mode B_SQUARE_JOIN
Square join mode.
\since BeOS R3
*/
/*!
\enum cap_mode
PostScript-style line cap modes used by BView::SetLineMode()
\since BeOS R3
*/
/*!
\var cap_mode B_ROUND_CAP
Round cap mode.
\since BeOS R3
*/
/*!
\var cap_mode B_BUTT_CAP
Butt cap mode.
\since BeOS R3
*/
/*!
\var cap_mode B_SQUARE_CAP
Square cap mode.
\since BeOS R3
*/
/*!
\var B_DEFAULT_MITER_LIMIT
Default miter limit used to calculate the angle cut off for miter joins.
\since BeOS R3
*/
///// Keyboard related functions
/*!
\fn uint32 modifiers()
\brief Gets a bitmap of each modifier key pressed down and each active
keyboard lock.
Test the bitmap returned using a bit mask composed of the following
modifier key constants:
- \c B_CAPS_LOCK
- \c B_COMMAND_KEY
- \c B_CONTROL_KEY
- \c B_MENU_KEY
- \c B_NUM_LOCK
- \c B_OPTION_KEY
- \c B_SCROLL_LOCK
- \c B_SHIFT_KEY
You may use a bit mask of 0 to test that no modifier keys are pressed.
If it is important to know if the left or right modifier key is pressed
down you can use the following additional constants:
- \c B_LEFT_SHIFT_KEY
- \c B_RIGHT_SHIFT_KEY
- \c B_LEFT_CONTROL_KEY
- \c B_RIGHT_CONTROL_KEY
- \c B_LEFT_OPTION_KEY
- \c B_RIGHT_OPTION_KEY
- \c B_LEFT_COMMAND_KEY
- \c B_RIGHT_COMMAND_KEY
\returns A bitmap containing each active modifier keys and locks.
\since BeOS R3
*/
/*!
\fn status_t get_key_info(key_info* info)
\brief Fills out the key_info struct with the current state of the
keyboard.
\param info The key_info struct to fill out.
\retval B_OK Everything went fine.
\retval B_ERROR There was an error retrieving the key_info struct.
\since BeOS R3
*/
/*!
\fn void get_key_map(key_map** _map, char** _keyBuffer)
\brief Provides a copy of the system keymap.
\attention You must free \a _map and \a _keyBuffer when you are done
with them.
\param _map A pointer to the system keymap structure.
\param _keyBuffer A pointer containing the UTF-8 character encodings.
\since BeOS R3
*/
/*!
\fn status_t get_keyboard_id(uint16* _id)
\brief Fills out \a _id with the id of the currently attached keyboard.
\retval B_OK Everything went fine.
\retval B_ERROR There was an error retrieving the keyboard id.
\since BeOS R3
*/
/*!
\fn status_t get_modifier_key(uint32 modifier, uint32 *key)
\brief Gets the code of the requested \a modifier key from the
system keymap.
\param modifier The modifier key to get from the system keymap.
\param key A pointer to an int32 to store the key code.
\retval B_OK Everything went fine.
\retval B_ERROR There was an error retrieving the modifier key.
\since BeOS R3
*/
/*!
\fn void set_modifier_key(uint32 modifier, uint32 key)
\brief Set the \a modifier \a key to the specified code in the
system keymap.
\param modifier The modifier key to set in the system keymap.
\param key The key code to set the modifier key to.
\since BeOS R3
*/
/*!
\fn void set_keyboard_locks(uint32 modifiers)
\brief Set the keyboard locks.
Pass in a bit mask containing the following constants:
- \c B_CAPS_LOCK
- \c B_NUM_LOCK
- \c B_SCROLL_LOCK
The constants present in the bit mask will turn the lock on, those
absent will turn the lock off. Pass 0 in to turn off all locks.
\param modifiers A bitmap of lock keys to set.
\since BeOS R3
*/