lxgui
|
Namespaces | |
namespace | sdl |
namespace | sfml |
Classes | |
class | dispatcher |
Handles inputs (keyboard and mouse) More... | |
struct | key_pressed_data |
Data for on_key_pressed signal. More... | |
struct | key_pressed_repeat_data |
Data for on_key_pressed_repeat signal. More... | |
struct | key_released_data |
Data for on_key_released signal. More... | |
struct | mouse_double_clicked_data |
Data for on_mouse_double_clicked signal. More... | |
struct | mouse_drag_start_data |
Data for on_mouse_drag_start signal. More... | |
struct | mouse_drag_stop_data |
Data for on_mouse_drag_stop signal. More... | |
struct | mouse_moved_data |
Data for on_mouse_moved signal. More... | |
struct | mouse_pressed_data |
Data for on_mouse_pressed signal. More... | |
struct | mouse_released_data |
Data for on_mouse_released signal. More... | |
struct | mouse_wheel_data |
Data for on_mouse_wheel signal. More... | |
class | signals |
Stores signals for input events. More... | |
class | source |
The base class for input source implementation. More... | |
struct | text_entered_data |
Data for on_text_entered signal. More... | |
class | window |
Represents the window in which the UI is displayed. More... | |
class | world_dispatcher |
Generates input events for the world, after filtering by the UI. More... | |
Enumerations | |
enum class | mouse_button : std::uint8_t { left = 0 , right , middle } |
enum class | mouse_button_event : std::uint8_t { up = 0 , down = 1 , double_click = 2 } |
enum class | key : std::uint8_t { k_unassigned = 0x00 , k_escape = 0x01 , k_1 = 0x02 , k_2 = 0x03 , k_3 = 0x04 , k_4 = 0x05 , k_5 = 0x06 , k_6 = 0x07 , k_7 = 0x08 , k_8 = 0x09 , k_9 = 0x0A , k_0 = 0x0B , k_minus = 0x0C , k_equals = 0x0D , k_back = 0x0E , k_tab = 0x0F , k_q = 0x10 , k_w = 0x11 , k_e = 0x12 , k_r = 0x13 , k_t = 0x14 , k_y = 0x15 , k_u = 0x16 , k_i = 0x17 , k_o = 0x18 , k_p = 0x19 , k_lbracket = 0x1A , k_rbracket = 0x1B , k_return = 0x1C , k_lcontrol = 0x1D , k_a = 0x1E , k_s = 0x1F , k_d = 0x20 , k_f = 0x21 , k_g = 0x22 , k_h = 0x23 , k_j = 0x24 , k_k = 0x25 , k_l = 0x26 , k_semicolon = 0x27 , k_apostrophe = 0x28 , k_grave = 0x29 , k_lshift = 0x2A , k_backslash = 0x2B , k_z = 0x2C , k_x = 0x2D , k_c = 0x2E , k_v = 0x2F , k_b = 0x30 , k_n = 0x31 , k_m = 0x32 , k_comma = 0x33 , k_period = 0x34 , k_slash = 0x35 , k_rshift = 0x36 , k_multiply = 0x37 , k_lmenu = 0x38 , k_space = 0x39 , k_capital = 0x3A , k_f1 = 0x3B , k_f2 = 0x3C , k_f3 = 0x3D , k_f4 = 0x3E , k_f5 = 0x3F , k_f6 = 0x40 , k_f7 = 0x41 , k_f8 = 0x42 , k_f9 = 0x43 , k_f10 = 0x44 , k_numlock = 0x45 , k_scroll = 0x46 , k_numpad_7 = 0x47 , k_numpad_8 = 0x48 , k_numpad_9 = 0x49 , k_subtract = 0x4A , k_numpad_4 = 0x4B , k_numpad_5 = 0x4C , k_numpad_6 = 0x4D , k_add = 0x4E , k_numpad_1 = 0x4F , k_numpad_2 = 0x50 , k_numpad_3 = 0x51 , k_numpad_0 = 0x52 , k_decimal = 0x53 , k_oem_102 = 0x56 , k_f11 = 0x57 , k_f12 = 0x58 , k_f13 = 0x64 , k_f14 = 0x65 , k_f15 = 0x66 , k_kana = 0x70 , k_abnt_c1 = 0x73 , k_convert = 0x79 , k_noconvert = 0x7B , k_yen = 0x7D , k_abnt_c2 = 0x7E , k_numpadequals = 0x8D , k_prevtrack = 0x90 , k_at = 0x91 , k_colon = 0x92 , k_underline = 0x93 , k_kanji = 0x94 , k_stop = 0x95 , k_ax = 0x96 , k_unlabeled = 0x97 , k_nexttrack = 0x99 , k_numpadenter = 0x9C , k_rcontrol = 0x9D , k_mute = 0xA0 , k_calculator = 0xA1 , k_playpause = 0xA2 , k_mediastop = 0xA4 , k_volumedown = 0xAE , k_volumeup = 0xB0 , k_webhome = 0xB2 , k_numpadcomma = 0xB3 , k_divide = 0xB5 , k_sysrq = 0xB7 , k_rmenu = 0xB8 , k_pause = 0xC5 , k_home = 0xC7 , k_up = 0xC8 , k_pgup = 0xC9 , k_left = 0xCB , k_right = 0xCD , k_end = 0xCF , k_down = 0xD0 , k_pgdown = 0xD1 , k_insert = 0xD2 , k_delete = 0xD3 , k_lwin = 0xDB , k_rwin = 0xDC , k_apps = 0xDD , k_power = 0xDE , k_sleep = 0xDF , k_wake = 0xE3 , k_websearch = 0xE5 , k_webfavorites = 0xE6 , k_webrefresh = 0xE7 , k_webstop = 0xE8 , k_webforward = 0xE9 , k_webback = 0xEA , k_mycomputer = 0xEB , k_mail = 0xEC , k_mediaselect = 0xED , k_maxkey = 0xFF } |
Functions | |
std::string_view | get_mouse_button_codename (mouse_button button_id) |
Returns a standard English name for the provided mouse button. | |
std::string_view | get_localizable_mouse_button_name (mouse_button button_id) |
Returns the localizable name of the provided mouse button. | |
std::string_view | get_mouse_button_event_codename (mouse_button_event button_event) |
Returns a standard English name for the provided mouse button event. | |
std::string_view | get_localizable_mouse_button_event_name (mouse_button_event button_event) |
Returns the localizable name of the provided mouse button event. | |
std::string_view | get_mouse_button_and_event_codename (mouse_button button_id, mouse_button_event button_event) |
Returns a standard Engilsh name for the provided mouse button and event. | |
std::optional< std::pair< mouse_button, mouse_button_event > > | get_mouse_button_and_event_from_codename (std::string_view button_and_event_name) |
Returns a mouse button and a button event ID from a string formatted as "<button>:<event>". | |
std::string_view | get_key_codename (key key_id) |
Returns a standard English name for the provided key. | |
key | get_key_from_codename (std::string_view key_name) |
Returns the key code from the standard English name of a key. | |
std::string_view | get_localizable_key_name (key key_id) |
Returns the localizable name of the provided key. | |
Variables | |
constexpr std::size_t | mouse_button_number = 3u |
constexpr std::size_t | key_number = static_cast<std::size_t>(key::k_maxkey) |
|
strong |
Definition at line 16 of file input_keys.hpp.
|
strong |
Enumerator | |
---|---|
left | |
right | |
middle |
Definition at line 12 of file input_keys.hpp.
|
strong |
Enumerator | |
---|---|
up | |
down | |
double_click |
Definition at line 14 of file input_keys.hpp.
std::string_view lxgui::input::get_key_codename | ( | key | key_id | ) |
Returns a standard English name for the provided key.
key_id | The key |
Definition at line 105 of file input_keys.cpp.
key lxgui::input::get_key_from_codename | ( | std::string_view | key_name | ) |
Returns the key code from the standard English name of a key.
key_name | The name of the key |
Definition at line 240 of file input_keys.cpp.
std::string_view lxgui::input::get_localizable_key_name | ( | key | key_id | ) |
Returns the localizable name of the provided key.
key_id | The key |
Definition at line 251 of file input_keys.cpp.
std::string_view lxgui::input::get_localizable_mouse_button_event_name | ( | mouse_button_event | button_event | ) |
Returns the localizable name of the provided mouse button event.
button_event | The ID code of the mouse button event |
Definition at line 34 of file input_keys.cpp.
std::string_view lxgui::input::get_localizable_mouse_button_name | ( | mouse_button | button_id | ) |
Returns the localizable name of the provided mouse button.
button_id | The ID code of the mouse button |
Definition at line 16 of file input_keys.cpp.
std::string_view lxgui::input::get_mouse_button_and_event_codename | ( | mouse_button | button_id, |
mouse_button_event | button_event | ||
) |
Returns a standard Engilsh name for the provided mouse button and event.
button_id | The ID code of the mouse button |
button_event | The ID code of the mouse button event |
Definition at line 44 of file input_keys.cpp.
std::optional< std::pair< mouse_button, mouse_button_event > > lxgui::input::get_mouse_button_and_event_from_codename | ( | std::string_view | button_and_event_name | ) |
Returns a mouse button and a button event ID from a string formatted as "<button>:<event>".
event_name | The name of the mouse button event, as "<button>:<event>" |
Definition at line 72 of file input_keys.cpp.
std::string_view lxgui::input::get_mouse_button_codename | ( | mouse_button | button_id | ) |
Returns a standard English name for the provided mouse button.
button_id | The ID code of the mouse button |
Definition at line 7 of file input_keys.cpp.
std::string_view lxgui::input::get_mouse_button_event_codename | ( | mouse_button_event | button_event | ) |
Returns a standard English name for the provided mouse button event.
button_event | The ID code of the mouse button event |
Definition at line 25 of file input_keys.cpp.
|
constexpr |
Definition at line 251 of file input_keys.hpp.
|
constexpr |
Definition at line 250 of file input_keys.hpp.