8#include "../enum_metadata.hpp"
13namespace hi::inline v1 {
15enum class gui_event_type {
22 keyboard_partial_grapheme,
37 text_cursor_left_char,
38 text_cursor_right_char,
39 text_cursor_down_char,
41 text_cursor_left_word,
42 text_cursor_right_word,
43 text_cursor_begin_line,
45 text_cursor_begin_sentence,
46 text_cursor_end_sentence,
47 text_cursor_begin_document,
48 text_cursor_end_document,
49 text_select_left_char,
50 text_select_right_char,
51 text_select_down_char,
54 text_select_left_word,
55 text_select_right_word,
56 text_select_begin_line,
58 text_select_begin_sentence,
59 text_select_end_sentence,
61 text_select_begin_document,
62 text_select_end_document,
63 text_delete_char_prev,
64 text_delete_char_next,
65 text_delete_word_prev,
66 text_delete_word_next,
75 text_insert_line_down,
91constexpr auto gui_event_type_metadata = enum_metadata{
92 gui_event_type::none,
"none",
93 gui_event_type::keyboard_down,
"keyboard_down",
94 gui_event_type::keyboard_grapheme,
"keyboard_grapheme",
95 gui_event_type::keyboard_partial_grapheme,
"keyboard_partial_grapheme",
96 gui_event_type::keyboard_enter,
"keyboard_enter",
97 gui_event_type::keyboard_exit,
"keyboard_exit",
98 gui_event_type::mouse_move,
"mouse_move",
99 gui_event_type::mouse_drag,
"mouse_drag",
100 gui_event_type::mouse_down,
"mouse_down",
101 gui_event_type::mouse_up,
"mouse_up",
102 gui_event_type::mouse_wheel,
"mouse_wheel",
103 gui_event_type::mouse_enter,
"mouse_enter",
104 gui_event_type::mouse_exit,
"mouse_exit",
105 gui_event_type::mouse_exit_window,
"mouse_exit_window",
106 gui_event_type::text_cursor_left_char,
"text_cursor_left_char",
107 gui_event_type::text_cursor_right_char,
"text_cursor_right_char",
108 gui_event_type::text_cursor_down_char,
"text_cursor_down_char",
109 gui_event_type::text_cursor_up_char,
"text_cursor_up_char",
110 gui_event_type::text_cursor_left_word,
"text_cursor_left_word",
111 gui_event_type::text_cursor_right_word,
"text_cursor_right_word",
112 gui_event_type::text_cursor_begin_line,
"text_cursor_begin_line",
113 gui_event_type::text_cursor_end_line,
"text_cursor_end_line",
114 gui_event_type::text_cursor_begin_sentence,
"text_cursor_begin_sentence",
115 gui_event_type::text_cursor_end_sentence,
"text_cursor_end_sentence",
116 gui_event_type::text_cursor_begin_document,
"text_cursor_begin_document",
117 gui_event_type::text_cursor_end_document,
"text_cursor_end_document",
118 gui_event_type::text_select_left_char,
"text_select_left_char",
119 gui_event_type::text_select_right_char,
"text_select_right_char",
120 gui_event_type::text_select_down_char,
"text_select_down_char",
121 gui_event_type::text_select_up_char,
"text_select_up_char",
122 gui_event_type::text_select_word,
"text_select_word",
123 gui_event_type::text_select_left_word,
"text_select_left_word",
124 gui_event_type::text_select_right_word,
"text_select_right_word",
125 gui_event_type::text_select_begin_line,
"text_select_begin_line",
126 gui_event_type::text_select_end_line,
"text_select_end_line",
127 gui_event_type::text_select_begin_sentence,
"text_select_begin_sentence",
128 gui_event_type::text_select_end_sentence,
"text_select_end_sentence",
129 gui_event_type::text_select_begin_document,
"text_select_begin_document",
130 gui_event_type::text_select_end_document,
"text_select_end_document",
131 gui_event_type::text_select_document,
"text_select_document",
132 gui_event_type::text_delete_char_prev,
"text_delete_char_prev",
133 gui_event_type::text_delete_char_next,
"text_delete_char_next",
134 gui_event_type::text_delete_word_prev,
"text_delete_word_prev",
135 gui_event_type::text_delete_word_next,
"text_delete_word_next",
136 gui_event_type::text_insert_line,
"text_insert_line",
137 gui_event_type::text_insert_line_up,
"text_insert_line_up",
138 gui_event_type::text_insert_line_down,
"text_insert_line_down",
139 gui_event_type::text_swap_chars,
"text_swap_chars",
140 gui_event_type::text_edit_paste,
"text_edit_paste",
141 gui_event_type::text_edit_copy,
"text_edit_copy",
142 gui_event_type::text_edit_cut,
"text_edit_cut",
143 gui_event_type::text_undo,
"text_undo",
144 gui_event_type::text_redo,
"text_redo",
145 gui_event_type::text_mode_insert,
"text_mode_insert",
146 gui_event_type::gui_widget_next,
"gui_widget_next",
147 gui_event_type::gui_widget_prev,
"gui_widget_prev",
148 gui_event_type::gui_menu_next,
"gui_menu_next",
149 gui_event_type::gui_menu_prev,
"gui_menu_prev",
150 gui_event_type::gui_sysmenu_open,
"gui_sysmenu_open",
151 gui_event_type::gui_toolbar_open,
"gui_toolbar_open",
152 gui_event_type::gui_toolbar_next,
"gui_toolbar_next",
153 gui_event_type::gui_toolbar_prev,
"gui_toolbar_prev",
154 gui_event_type::gui_activate,
"gui_activate",
155 gui_event_type::gui_activate_next,
"gui_activate_next",
156 gui_event_type::gui_cancel,
"gui_cancel"
160inline std::string_view
to_string(gui_event_type rhs)
noexcept
162 return gui_event_type_metadata[rhs];
167 return lhs << gui_event_type_metadata[rhs];
170constexpr gui_event_type to_gui_event_type(std::string_view name)
noexcept
172 return gui_event_type_metadata.at(name, gui_event_type::none);
This file includes required definitions.