Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Monostate used to provide miscellaneous Gui related utilities. More...
Public Types | |
enum | KeyId { KEY_ID_BACKSPACE = 0xff08, KEY_ID_TAB = 0xff09, KEY_ID_ENTER = 0xff0d, KEY_ID_PAUSE = 0xff13, KEY_ID_SCROLL_LOCK = 0xff14, KEY_ID_ESCAPE = 0xff1b, KEY_ID_HOME = 0xff50, KEY_ID_LEFT = 0xff51, KEY_ID_UP = 0xff52, KEY_ID_RIGHT = 0xff53, KEY_ID_DOWN = 0xff54, KEY_ID_PAGE_UP = 0xff55, KEY_ID_PAGE_DOWN = 0xff56, KEY_ID_END = 0xff57, KEY_ID_PRINT = 0xff61, KEY_ID_INSERT = 0xff63, KEY_ID_MENU = 0xff67, KEY_ID_HELP = 0xff68, KEY_ID_NUM_LOCK = 0xff7f, KEY_ID_KEYPAD_0 = KEY_ID_PAD + '0', KEY_ID_KEYPAD_1 = KEY_ID_KEYPAD_0 + 1, KEY_ID_KEYPAD_2 = KEY_ID_KEYPAD_0 + 2, KEY_ID_KEYPAD_3 = KEY_ID_KEYPAD_0 + 3, KEY_ID_KEYPAD_4 = KEY_ID_KEYPAD_0 + 4, KEY_ID_KEYPAD_5 = KEY_ID_KEYPAD_0 + 5, KEY_ID_KEYPAD_6 = KEY_ID_KEYPAD_0 + 6, KEY_ID_KEYPAD_7 = KEY_ID_KEYPAD_0 + 7, KEY_ID_KEYPAD_8 = KEY_ID_KEYPAD_0 + 8, KEY_ID_KEYPAD_9 = KEY_ID_KEYPAD_0 + 9, KEY_ID_KEYPAD_ADD = KEY_ID_PAD + '+', KEY_ID_KEYPAD_SUBTRACT = KEY_ID_PAD + '-', KEY_ID_KEYPAD_MULTIPLY = KEY_ID_PAD + '*', KEY_ID_KEYPAD_DEVIDE = KEY_ID_PAD + '/', KEY_ID_KEYPAD_DECIMAL = KEY_ID_PAD + '.', KEY_ID_KEYPAD_ENTER = KEY_ID_PAD + '\r', KEY_ID_F0 = 0xffbd, KEY_ID_F1 = KEY_ID_F0 + 1, KEY_ID_F2 = KEY_ID_F0 + 2, KEY_ID_F3 = KEY_ID_F0 + 3, KEY_ID_F4 = KEY_ID_F0 + 4, KEY_ID_F5 = KEY_ID_F0 + 5, KEY_ID_F6 = KEY_ID_F0 + 6, KEY_ID_F7 = KEY_ID_F0 + 7, KEY_ID_F8 = KEY_ID_F0 + 8, KEY_ID_F9 = KEY_ID_F0 + 9, KEY_ID_F10 = KEY_ID_F0 + 10, KEY_ID_F11 = KEY_ID_F0 + 11, KEY_ID_F12 = KEY_ID_F0 + 112, KEY_ID_LEFT_SHIFT = 0xffe1, KEY_ID_RIGHT_SHIFT = 0xffe2, KEY_ID_LEFT_CONTROL = 0xffe3, KEY_ID_RIGHT_CONTROL = 0xffe4, KEY_ID_CAPS_LOCK = 0xffe5, KEY_ID_LEFT_META = 0xffe7, KEY_ID_RIGHT_META = 0xffe8, KEY_ID_LEFT_ALT = 0xffe9, KEY_ID_RIGHT_ALT = 0xffea, KEY_ID_DELETE = 0xffff, KEY_ID_COUNT = 58 } |
enum | ModifierKeyId { MODIFIER_KEY_ID_SHIFT = 0x00010000, MODIFIER_KEY_ID_CAPS_LOCK = 0x00020000, MODIFIER_KEY_ID_CTRL = 0x00040000, MODIFIER_KEY_ID_ALT = 0x00080000, MODIFIER_KEY_ID_NUM_LOCK = 0x00100000, MODIFIER_KEY_ID_META = 0x00400000, MODIFIER_KEY_ID_SCROLL_LOCK = 0x00800000, MODIFIER_KEY_ID_BUTTON_LEFT = 0x01000000, MODIFIER_KEY_ID_BUTTON_MIDDLE = 0x02000000, MODIFIER_KEY_ID_BUTTON_RIGHT = 0x04000000, MODIFIER_KEY_ID_COUNT = 10 } |
enum | MouseButtonId { MOUSE_BUTTON_ID_LEFT = 1, MOUSE_BUTTON_ID_MIDDLE = 2, MOUSE_BUTTON_ID_RIGHT = 3, MOUSE_BUTTON_ID_COUNT = 4 } |
enum | MouseCursorId { MOUSE_CURSOR_DEFAULT = 0, MOUSE_CURSOR_ARROW = 35, MOUSE_CURSOR_CROSS = 66, MOUSE_CURSOR_WAIT = 76, MOUSE_CURSOR_INSERT = 77, MOUSE_CURSOR_HAND = 31, MOUSE_CURSOR_HELP = 47, MOUSE_CURSOR_MOVE = 27, MOUSE_CURSOR_NS = 78, MOUSE_CURSOR_WE = 79, MOUSE_CURSOR_NWSE = 80, MOUSE_CURSOR_NESW = 81, MOUSE_CURSOR_NO_ENTRY = 1, MOUSE_CURSOR_NONE = 255, MOUSE_CURSOR_COUNT = 15 } |
enum | DeviceId { DEVICE_MOUSE = 0, DEVICE_STYLUS = 1, DEVICE_ERASER = 2, DEVICE_CURSOR = 3, DEVICE_AIRBRUSH = 4, DEVICE_TOUCH = 5, DEVICE_COUNT = 6 } |
enum | WindowsTabletApi |
enum | ColorDepth { COLOR_DEPTH_RGB = 0, COLOR_DEPTH_RGBA = 1, COLOR_DEPTH_L = 2, COLOR_DEPTH_LA = 3, COLOR_DEPTH_A = 4, COLOR_DEPTH_COUNT = 5 } |
Static Public Member Functions | |
static int | get_screen_width () |
static int | get_screen_height () |
static GMathVec4i | get_screen_bbox (int mx, int my) |
Gets the bounding box of a screen that contains the specified screen position mx, my. | |
static void | open_uri (const CoreString &uri) |
static void | copy_to_clipboard (const CoreString &str, const char *signature=0) |
static void | paste_from_clipboard () |
static void | copy_to_selection_buffer (const CoreString &str) |
static void | paste_from_selection_buffer () |
static CoreString | get_event_text () |
static const char * | get_key_id_name (const KeyId &id) |
static bool | is_key_pressed (int key) |
static bool | is_key_down (int key) |
static int | get_last_key_pressed () |
static CoreString | get_key_pressed_text () |
static int | get_count_of_next_character (const char &c) |
static const char * | get_modifier_key_id_name (const ModifierKeyId &id) |
static bool | is_modifier_pressed (const ModifierKeyId &id) |
static bool | is_modifier_shift () |
static bool | is_modifier_caps_lock () |
static bool | is_modifier_ctrl () |
static bool | is_modifier_alt () |
static bool | is_modifier_num_lock () |
static bool | is_modifier_meta () |
static bool | is_modifier_scroll_lock () |
static bool | is_modifier_button_left () |
static bool | is_modifier_button_middle () |
static bool | is_modifier_button_right () |
static const char * | get_mouse_button_id_name (const MouseButtonId &id) |
static MouseButtonId | get_event_mouse_button () |
static bool | is_one_click () |
static bool | is_double_click () |
static bool | is_triple_click () |
static unsigned int | get_event_clicks_count () |
static bool | is_mouse_button_pressed (const MouseButtonId &id) |
static bool | is_mouse_button_pressed () |
static int | get_relative_mouse_x (const GuiWidget *widget) |
return x position of the mouse relative to given widget position. | |
static int | get_relative_mouse_y (const GuiWidget *widget) |
return y position of the mouse relative to given widget position. | |
static void | get_relative_mouse_coords (const GuiWidget *widget, int &x, int &y) |
get x and y position of the mouse relative to given widget position. | |
static int | get_absolute_mouse_x (const GuiWidget *widget) |
return x position of the mouse relative to given widget position in his parent window. | |
static int | get_absolute_mouse_y (const GuiWidget *widget) |
return y position of the mouse relative to given widget position in his parent window. | |
static void | get_absolute_mouse_coords (const GuiWidget *widget, int &x, int &y) |
get x and y position of the mouse relative to given widget position in his parent window. | |
static int | get_mouse_dx () |
get mouse wheel increment on x axis | |
static int | get_mouse_dy () |
get mouse wheel increment on y axis | |
static int | set_mouse_screen_position (const int &new_x, const int &new_y) |
static void | get_mouse_screen_position (int &x, int &y) |
static int | get_mouse_screen_position_x () |
static int | get_mouse_screen_position_y () |
static bool | is_mouse_over_screen_region (const int &x, const int &y, const int &w, const int &h) |
check in screen coordinates if the mouse is over the region given in parameters | |
static bool | is_mouse_over_region (GuiWidget *widget, const int &x, const int &y, const int &w, const int &h) |
static bool | is_mouse_over_region (GuiWidget *widget, int rect[4]) |
static bool | is_mouse_over_widget (GuiWidget *widget) |
check in screen coordinates if the mouse is over the widegt given in parameters | |
static GuiWidget * | get_below_mouse_widget () |
static const char * | get_mouse_cursor_name (const MouseCursorId &cursor) |
static void | set_mouse_cursor (const MouseCursorId &cursor) |
static const char * | get_device_id_name (const DeviceId &id) |
Get DeviceID name as string. | |
static DeviceId | get_device_type () |
Get current raw device type. | |
static float | get_x_tilt () |
Get stylus X tilt angle (azimuth). | |
static float | get_y_tilt () |
Get stylus Y tilt angle (altitude). | |
static float | get_pressure () |
Get stylus pressure value. | |
static const char * | get_windows_tablet_api_name (WindowsTabletApi api) |
Get Windows Tablet API name as string. | |
static const char * | get_channel_depth_name (const ColorDepth &color_depth) |
static unsigned int | get_channel_count_by_color_depth (const ColorDepth &color_depth) |
static Gui::ColorDepth | get_color_depth_from_visual_hint (unsigned int visual_hint) |
static void | get_8bits_color (GuiApp &app, const GMathVec3d &in, unsigned char *out) |
Converts a linear color into a default color space unsigned char RGB color. | |
static GMathVec3uc | get_8bits_color (GuiApp &app, const GMathVec3d &in) |
Converts a linear color into a default color space unsigned char RGB color. | |
static bool | can_use_root_as_vizroot (GuiApp &app) |
Returns wether we can use the root context as a vizroot or not. | |
Static Public Attributes | |
static CoreString | clipboard_signature = "" |
Monostate used to provide miscellaneous Gui related utilities.
enum Gui::DeviceId |
Windows tablet APIs.
|
static |
Get a color depth from an attribute's visual hint
visual_hint | The OfAttr::VISUAL_HINT enum to check, passed as an unsigned int |
|
static |
Get current raw device type.
Use GuiApp::get_input_device_type() instead, to take into account the value of the "Input Device Mode" preference value.
|
static |
Get stylus pressure value.
|
static |
Get stylus X tilt angle (azimuth).
|
static |
Get stylus Y tilt angle (altitude).
|
static |
|
static |
|
static |
Helper to use is_mouse_over_region with GMathVec4i or int[4] values. (for GMathVec4i, use get_data())