Defines standard interface definitions for controls. More...
Functions | |
status_t | get_click_speed (bigtime_t *speed) |
Get the double-click maximum delay. | |
status_t | get_click_speed (const char *mouse_name, bigtime_t *speed) |
Get the double-click maximum delay for a specific mouse. | |
status_t | get_key_info (key_info *info) |
Fills out the key_info struct with the current state of the keyboard. | |
void | get_key_map (key_map **_map, char **_keyBuffer) |
Provides a copy of the system keymap. | |
status_t | get_keyboard_id (uint16 *_id) |
Fills out _id with the id of the currently attached keyboard. | |
status_t | get_modifier_key (uint32 modifier, uint32 *key) |
Gets the code of the requested modifier key from the system keymap. | |
status_t | get_mouse_acceleration (const char *mouse_name, int32 *speed) |
Get the mouse acceleration setting for a specific mouse. | |
status_t | get_mouse_acceleration (int32 *speed) |
Get the mouse acceleration. | |
status_t | get_mouse_map (const char *mouse_name, mouse_map *map) |
Get the button map for a specific mouse. | |
status_t | get_mouse_map (mouse_map *map) |
Get the button map of the mouse. | |
status_t | get_mouse_speed (const char *mouse_name, int32 *speed) |
Get the mouse speed setting for a specific mouse. | |
status_t | get_mouse_speed (int32 *speed) |
Get the mouse speed. | |
status_t | get_mouse_type (const char *mouse_name, int32 *type) |
Get the number of buttons for a specific mouse. | |
status_t | get_mouse_type (int32 *type) |
Get the number of buttons of the mouse. | |
uint32 | modifiers () |
Gets a bitmap of each modifier key pressed down and each active keyboard lock. | |
status_t | set_click_speed (bigtime_t speed) |
Set the double-click maximum delay. | |
status_t | set_click_speed (const char *mouse_name, bigtime_t speed) |
Set the double-click maximum delay for a specific mouse. | |
void | set_keyboard_locks (uint32 modifiers) |
Set the keyboard locks. | |
void | set_modifier_key (uint32 modifier, uint32 key) |
Set the modifier key to the specified code in the system keymap. | |
status_t | set_mouse_acceleration (const char *mouse_name, int32 speed) |
Set the mouse acceleration for a specific mouse. | |
status_t | set_mouse_map (const char *mouse_name, mouse_map *map) |
Set the button map for a specific mouse. | |
status_t | set_mouse_map (mouse_map *map) |
Set the button map of the mouse. | |
status_t | set_mouse_speed (const char *mouse_name, int32 speed) |
Set the mouse speed for a specific mouse. | |
status_t | set_mouse_type (const char *mouse_name, int32 type) |
Configure the number of buttons for a specific mouse. | |
Variables | |
const float | B_DEFAULT_MITER_LIMIT = 10.0F |
Defines standard interface definitions for controls.
enum border_style |
enum button_width |
enum cap_mode |
enum color_which |
Enumerator | |
---|---|
B_NO_COLOR | This indicates that no color has been configured for the View.
|
B_PANEL_BACKGROUND_COLOR | The background color of a panel, a panel in this context is a window area on which controls are added. For example the background of preferences/appearence use with B_PANEL_TEXT_COLOR
|
B_PANEL_TEXT_COLOR | The text color matching B_PANEL_BACKGROUND_COLOR.
|
B_DOCUMENT_BACKGROUND_COLOR | The background color of a text view. For example the background of a BTextView. use with B_DOCUMENT_TEXT_COLOR
|
B_DOCUMENT_TEXT_COLOR | The text color matching B_DOCUMENT_BACKGROUND_COLOR.
|
B_CONTROL_BACKGROUND_COLOR | The background of a control. For example a Button. use with B_CONTROL_TEXT_COLOR
|
B_CONTROL_TEXT_COLOR | The text color matching B_CONTROL_BACKGROUND_COLOR.
|
B_CONTROL_BORDER_COLOR | The border of a control. For example a Button. use with B_CONTROL_BACKGROUND_COLOR
|
B_CONTROL_HIGHLIGHT_COLOR |
|
B_CONTROL_MARK_COLOR |
|
B_NAVIGATION_BASE_COLOR | This is used to the keyboard focus.
|
B_NAVIGATION_PULSE_COLOR |
|
B_SHINE_COLOR |
|
B_SHADOW_COLOR |
|
B_LINK_TEXT_COLOR | The color of links (URLs).
|
B_LINK_HOVER_COLOR | The color of a link (URL) that is currently hovered by the mouse.
|
B_LINK_VISITED_COLOR | The color of a link (URL) that was visited in the past.
|
B_LINK_ACTIVE_COLOR | The color of a link (URL) that is active. This is a link that is currently beeing clicked, but the user has not yet let go of the mouse.
|
B_MENU_BACKGROUND_COLOR | The background color of a menu.
|
B_MENU_SELECTED_BACKGROUND_COLOR | The background color of selected menu item. Relates to B_MENU_BACKGROUND_COLOR
|
B_MENU_ITEM_TEXT_COLOR | The text color of a menu item. Use with B_MENU_BACKGROUND_COLOR.
|
B_MENU_SELECTED_ITEM_TEXT_COLOR | The text color of a selected menu item. Use with B_MENU_SELECTED_BACKGROUND_COLOR.
|
B_MENU_SELECTED_BORDER_COLOR |
|
B_LIST_BACKGROUND_COLOR | The background color of a list. This is used by BListView.
|
B_LIST_SELECTED_BACKGROUND_COLOR | The background color of a selected list item.
|
B_LIST_ITEM_TEXT_COLOR | The text color of a list item. Use with B_LIST_BACKGROUND_COLOR.
|
B_LIST_SELECTED_ITEM_TEXT_COLOR | The text color of a selected list item. Use with B_LIST_SELECTED_BACKGROUND_COLOR.
|
B_SCROLL_BAR_THUMB_COLOR | The color of the thumb of a scrollbar. This is the part you can drag.
|
B_TOOL_TIP_BACKGROUND_COLOR | The background color of a tooltip.
|
B_TOOL_TIP_TEXT_COLOR | The text color of a tooltip. Use with B_TOOL_TIP_BACKGROUND_COLOR.
|
B_STATUS_BAR_COLOR | This is used by progress bars. For example by BStatusBar.
|
B_SUCCESS_COLOR | This marks operations that suceeded. For example downloads in WebPositive that completed.
|
B_FAILURE_COLOR | This marks operations that failed. For example downloads in WebPositive that failed or wrong user input. Used by BTextControl::MarkAsInvalid
|
B_WINDOW_TAB_COLOR | The background color of the active window tab.
|
B_WINDOW_TEXT_COLOR | The text color of the active window tab. Use with B_WINDOW_TAB_COLOR.
|
B_WINDOW_INACTIVE_TAB_COLOR | The background color of inactive window tabs.
|
B_WINDOW_INACTIVE_TEXT_COLOR | The text color of inactive window tabs. Use with B_WINDOW_INACTIVE_TAB_COLOR.
|
B_WINDOW_BORDER_COLOR | The border color of the active window. Relates to B_WINDOW_TAB_COLOR.
|
B_WINDOW_INACTIVE_BORDER_COLOR | The border color of the inactive windows. Relates to B_WINDOW_INACTIVE_TAB_COLOR.
|
enum join_mode |
enum orientation |
Get the double-click maximum delay for a specific mouse.
status_t get_key_info | ( | key_info * | info | ) |
Fills out the key_info struct with the current state of the keyboard.
info | The key_info struct to fill out. |
B_OK | Everything went fine. |
B_ERROR | There was an error retrieving the key_info struct. |
void get_key_map | ( | key_map ** | _map, |
char ** | _keyBuffer | ||
) |
Provides a copy of the system keymap.
_map | A pointer to the system keymap structure. |
_keyBuffer | A pointer containing the UTF-8 character encodings. |
Fills out _id with the id of the currently attached keyboard.
B_OK | Everything went fine. |
B_ERROR | There was an error retrieving the keyboard id. |
Gets the code of the requested modifier key from the system keymap.
modifier | The modifier key to get from the system keymap. |
key | A pointer to an int32 to store the key code. |
B_OK | Everything went fine. |
B_ERROR | There was an error retrieving the modifier key. |
Get the mouse acceleration setting for a specific mouse.
Get the mouse acceleration.
If there are multiple mouses connected, this function returns the speed from a random one.
status_t get_mouse_map | ( | const char * | mouse_name, |
mouse_map * | map | ||
) |
Get the button map for a specific mouse.
status_t get_mouse_map | ( | mouse_map * | map | ) |
Get the button map of the mouse.
Get the mouse speed setting for a specific mouse.
Get the mouse speed.
If there are multiple mouses connected, this function returns the speed from a random one.
Get the number of buttons for a specific mouse.
Mouse names can be known from BInputDevice.
Get the number of buttons of the mouse.
If there are multiple mouses connected, the number of buttons for one of them picked at random will be returned.
uint32 modifiers | ( | ) |
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:
B_CAPS_LOCK
B_COMMAND_KEY
B_CONTROL_KEY
B_MENU_KEY
B_NUM_LOCK
B_OPTION_KEY
B_SCROLL_LOCK
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:
B_LEFT_SHIFT_KEY
B_RIGHT_SHIFT_KEY
B_LEFT_CONTROL_KEY
B_RIGHT_CONTROL_KEY
B_LEFT_OPTION_KEY
B_RIGHT_OPTION_KEY
B_LEFT_COMMAND_KEY
B_RIGHT_COMMAND_KEY
Set the double-click maximum delay for a specific mouse.
void set_keyboard_locks | ( | uint32 | modifiers | ) |
Set the keyboard locks.
Pass in a bit mask containing the following constants:
B_CAPS_LOCK
B_NUM_LOCK
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.
modifiers | A bitmap of lock keys to set. |
Set the modifier key to the specified code in the system keymap.
modifier | The modifier key to set in the system keymap. |
key | The key code to set the modifier key to. |
Set the mouse acceleration for a specific mouse.
The setting is saved and persists accross reboots.
status_t set_mouse_map | ( | const char * | mouse_name, |
mouse_map * | map | ||
) |
Set the button map for a specific mouse.
The setting is saved and persists accross reboots.
status_t set_mouse_map | ( | mouse_map * | map | ) |
Set the button map of the mouse.
Set the mouse speed for a specific mouse.
The setting is saved and persists accross reboots.
Configure the number of buttons for a specific mouse.
The setting is saved and persists accross reboots.
B_DEFAULT_MITER_LIMIT = 10.0F |
Default miter limit used to calculate the angle cut off for miter joins.