File include/brisk/window/Types.hpp¶
KeyCode enum¶
enum class KeyCode : int32_t
KeyCodeKeyboard key codes.
Represents various keyboard keys with their corresponding integer values, used for processing keyboard input events.
Unknown enumerator (KeyCode::Unknown)¶
Unknown key
Space enumerator (KeyCode::Space)¶
Space key
Apostrophe enumerator (KeyCode::Apostrophe)¶
Apostrophe key (')
Comma enumerator (KeyCode::Comma)¶
Comma key (,)
Minus enumerator (KeyCode::Minus)¶
Minus key (-)
Period enumerator (KeyCode::Period)¶
Period key (.)
Slash enumerator (KeyCode::Slash)¶
Slash key (/)
Digit0 enumerator (KeyCode::Digit0)¶
Digit 0 key
Digit1 enumerator (KeyCode::Digit1)¶
Digit 1 key
Digit2 enumerator (KeyCode::Digit2)¶
Digit 2 key
Digit3 enumerator (KeyCode::Digit3)¶
Digit 3 key
Digit4 enumerator (KeyCode::Digit4)¶
Digit 4 key
Digit5 enumerator (KeyCode::Digit5)¶
Digit 5 key
Digit6 enumerator (KeyCode::Digit6)¶
Digit 6 key
Digit7 enumerator (KeyCode::Digit7)¶
Digit 7 key
Digit8 enumerator (KeyCode::Digit8)¶
Digit 8 key
Digit9 enumerator (KeyCode::Digit9)¶
Digit 9 key
Semicolon enumerator (KeyCode::Semicolon)¶
Semicolon key (;)
Equal enumerator (KeyCode::Equal)¶
Equal key (=)
A enumerator (KeyCode::A)¶
A key
B enumerator (KeyCode::B)¶
B key
C enumerator (KeyCode::C)¶
C key
D enumerator (KeyCode::D)¶
D key
E enumerator (KeyCode::E)¶
E key
F enumerator (KeyCode::F)¶
F key
G enumerator (KeyCode::G)¶
G key
H enumerator (KeyCode::H)¶
H key
I enumerator (KeyCode::I)¶
I key
J enumerator (KeyCode::J)¶
J key
K enumerator (KeyCode::K)¶
K key
L enumerator (KeyCode::L)¶
L key
M enumerator (KeyCode::M)¶
M key
N enumerator (KeyCode::N)¶
N key
O enumerator (KeyCode::O)¶
O key
P enumerator (KeyCode::P)¶
P key
Q enumerator (KeyCode::Q)¶
Q key
R enumerator (KeyCode::R)¶
R key
S enumerator (KeyCode::S)¶
S key
T enumerator (KeyCode::T)¶
T key
U enumerator (KeyCode::U)¶
U key
V enumerator (KeyCode::V)¶
V key
W enumerator (KeyCode::W)¶
W key
X enumerator (KeyCode::X)¶
X key
Y enumerator (KeyCode::Y)¶
Y key
Z enumerator (KeyCode::Z)¶
Z key
LeftBracket enumerator (KeyCode::LeftBracket)¶
Left bracket key ([)
Backslash enumerator (KeyCode::Backslash)¶
Backslash key ()
RightBracket enumerator (KeyCode::RightBracket)¶
Right bracket key (])
GraveAccent enumerator (KeyCode::GraveAccent)¶
Grave accent key (`)
World1 enumerator (KeyCode::World1)¶
Non-US keyboard key 1
World2 enumerator (KeyCode::World2)¶
Non-US keyboard key 2
Escape enumerator (KeyCode::Escape)¶
Escape key
Enter enumerator (KeyCode::Enter)¶
Enter key
Tab enumerator (KeyCode::Tab)¶
Tab key
Backspace enumerator (KeyCode::Backspace)¶
Backspace key
Insert enumerator (KeyCode::Insert)¶
Insert key
Del enumerator (KeyCode::Del)¶
Delete key
Right enumerator (KeyCode::Right)¶
Right arrow key
Left enumerator (KeyCode::Left)¶
Left arrow key
Down enumerator (KeyCode::Down)¶
Down arrow key
Up enumerator (KeyCode::Up)¶
Up arrow key
PageUp enumerator (KeyCode::PageUp)¶
Page Up key
PageDown enumerator (KeyCode::PageDown)¶
Page Down key
Home enumerator (KeyCode::Home)¶
Home key
End enumerator (KeyCode::End)¶
End key
CapsLock enumerator (KeyCode::CapsLock)¶
Caps Lock key
ScrollLock enumerator (KeyCode::ScrollLock)¶
Scroll Lock key
NumLock enumerator (KeyCode::NumLock)¶
Num Lock key
PrintScreen enumerator (KeyCode::PrintScreen)¶
Print Screen key
Pause enumerator (KeyCode::Pause)¶
Pause key
F1 enumerator (KeyCode::F1)¶
F1 function key
F2 enumerator (KeyCode::F2)¶
F2 function key
F3 enumerator (KeyCode::F3)¶
F3 function key
F4 enumerator (KeyCode::F4)¶
F4 function key
F5 enumerator (KeyCode::F5)¶
F5 function key
F6 enumerator (KeyCode::F6)¶
F6 function key
F7 enumerator (KeyCode::F7)¶
F7 function key
F8 enumerator (KeyCode::F8)¶
F8 function key
F9 enumerator (KeyCode::F9)¶
F9 function key
F10 enumerator (KeyCode::F10)¶
F10 function key
F11 enumerator (KeyCode::F11)¶
F11 function key
F12 enumerator (KeyCode::F12)¶
F12 function key
F13 enumerator (KeyCode::F13)¶
F13 function key
F14 enumerator (KeyCode::F14)¶
F14 function key
F15 enumerator (KeyCode::F15)¶
F15 function key
F16 enumerator (KeyCode::F16)¶
F16 function key
F17 enumerator (KeyCode::F17)¶
F17 function key
F18 enumerator (KeyCode::F18)¶
F18 function key
F19 enumerator (KeyCode::F19)¶
F19 function key
F20 enumerator (KeyCode::F20)¶
F20 function key
F21 enumerator (KeyCode::F21)¶
F21 function key
F22 enumerator (KeyCode::F22)¶
F22 function key
F23 enumerator (KeyCode::F23)¶
F23 function key
F24 enumerator (KeyCode::F24)¶
F24 function key
F25 enumerator (KeyCode::F25)¶
F25 function key
Num0 enumerator (KeyCode::Num0)¶
Numpad 0 key
Num1 enumerator (KeyCode::Num1)¶
Numpad 1 key
Num2 enumerator (KeyCode::Num2)¶
Numpad 2 key
Num3 enumerator (KeyCode::Num3)¶
Numpad 3 key
Num4 enumerator (KeyCode::Num4)¶
Numpad 4 key
Num5 enumerator (KeyCode::Num5)¶
Numpad 5 key
Num6 enumerator (KeyCode::Num6)¶
Numpad 6 key
Num7 enumerator (KeyCode::Num7)¶
Numpad 7 key
Num8 enumerator (KeyCode::Num8)¶
Numpad 8 key
Num9 enumerator (KeyCode::Num9)¶
Numpad 9 key
NumDecimal enumerator (KeyCode::NumDecimal)¶
Numpad decimal key
NumDivide enumerator (KeyCode::NumDivide)¶
Numpad divide key
NumMultiply enumerator (KeyCode::NumMultiply)¶
Numpad multiply key
NumSubtract enumerator (KeyCode::NumSubtract)¶
Numpad subtract key
NumAdd enumerator (KeyCode::NumAdd)¶
Numpad add key
NumEnter enumerator (KeyCode::NumEnter)¶
Numpad enter key
NumEqual enumerator (KeyCode::NumEqual)¶
Numpad equal key
LeftShift enumerator (KeyCode::LeftShift)¶
Left Shift key
LeftControl enumerator (KeyCode::LeftControl)¶
Left Control key
LeftAlt enumerator (KeyCode::LeftAlt)¶
Left Alt key
LeftSuper enumerator (KeyCode::LeftSuper)¶
Left Super (Windows/Command) key
RightShift enumerator (KeyCode::RightShift)¶
Right Shift key
RightControl enumerator (KeyCode::RightControl)¶
Right Control key
RightAlt enumerator (KeyCode::RightAlt)¶
Right Alt key
RightSuper enumerator (KeyCode::RightSuper)¶
Right Super (Windows/Command) key
Menu enumerator (KeyCode::Menu)¶
Menu key
Last enumerator (KeyCode::Last)¶
Last valid key code
operator+ function¶
constexpr std::underlying_type_t<KeyCode>
operator+(KeyCode code)
Converts KeyCode to its underlying integer type.
Param code The KeyCode to convert.
Returns The underlying integer value of the KeyCode.
numKeyCodes variable¶
constexpr inline size_t numKeyCodes = +KeyCode::Last + 1
Number of key codes defined.
numScanCodes variable¶
constexpr inline size_t numScanCodes = 512
Number of scan codes supported.
keyCodes variable¶
extern const NameValueOrderedList<KeyCode> keyCodes
Ordered list mapping KeyCode values to their names.
keyCodeToString function¶
inline std::string keyCodeToString(KeyCode code)
Converts a KeyCode to its string representation.
Param code The KeyCode to convert.
Returns The string name of the KeyCode, or an empty string if not found.
format_as function¶
inline std::string format_as(KeyCode code)
Formats a KeyCode as a string.
Param code The KeyCode to format.
Returns The string representation of the KeyCode.
stringToKeyCode function¶
inline std::optional<KeyCode>
stringToKeyCode(const std::string &str)
Converts a string to a KeyCode.
Param str The string to convert.
Returns The corresponding KeyCode, or std::nullopt if not found.
KeyModifiers enum¶
enum class KeyModifiers
KeyModifiersEnumerates modifier keys for keyboard shortcuts.
Represents modifier keys (e.g., Shift, Control) as bit flags for use in keyboard shortcuts.
None enumerator (KeyModifiers::None)¶
No modifiers
All enumerator (KeyModifiers::All)¶
All modifiers
Shift enumerator (KeyModifiers::Shift)¶
Shift key
Control enumerator (KeyModifiers::Control)¶
Control key
Alt enumerator (KeyModifiers::Alt)¶
Alt key
Super enumerator (KeyModifiers::Super)¶
Super (Windows/Command) key
CapsLock enumerator (KeyModifiers::CapsLock)¶
Caps Lock key
NumLock enumerator (KeyModifiers::NumLock)¶
Num Lock key
Regular enumerator (KeyModifiers::Regular)¶
Regular modifier combination
MacosOption enumerator (KeyModifiers::MacosOption)¶
macOS Option key (Alt)
MacosControl enumerator (KeyModifiers::MacosControl)¶
macOS Control key
MacosCommand enumerator (KeyModifiers::MacosCommand)¶
macOS Command key (Super)
WinAlt enumerator (KeyModifiers::WinAlt)¶
Windows Alt key
WinControl enumerator (KeyModifiers::WinControl)¶
Windows Control key
WinWindows enumerator (KeyModifiers::WinWindows)¶
Windows key (Super)
ControlOrCommand enumerator (KeyModifiers::ControlOrCommand)¶
Control or Command key (Windows)
keyModifiersToString function¶
std::string
keyModifiersToString(KeyModifiers mods,
const std::string &joiner = "+",
bool finalJoiner = true)
Converts KeyModifiers to a string representation.
Param mods The KeyModifiers to convert.
Param joiner The string used to join modifier names (default: "+").
Param finalJoiner If true, appends the joiner at the end (default: true).
Returns The string representation of the modifiers.
Shortcut class¶
Shortcut
ShortcutRepresents a keyboard shortcut combining a key and modifiers.
modifiers variable (Shortcut::modifiers)¶
KeyModifiers modifiers = KeyModifiers::None
Modifier keys
key variable (Shortcut::key)¶
KeyCode key = KeyCode::Unknown
Primary key
operator== function (Shortcut::operator==)¶
bool operator==(const Shortcut &) const noexcept = default
Compares two shortcuts for equality.
Param other The other Shortcut to compare with.
Returns True if the shortcuts are equal, false otherwise.
format_as function¶
inline std::string format_as(Shortcut shortcut)
Formats a Shortcut as a string.
Param shortcut The Shortcut to format.
Returns The string representation of the shortcut (modifiers + key).
KeyAction enum¶
enum class KeyAction
KeyActionEnumerates possible keyboard key actions.
Release enumerator (KeyAction::Release)¶
Key released
Press enumerator (KeyAction::Press)¶
Key pressed
Repeat enumerator (KeyAction::Repeat)¶
Key held and repeating
MouseAction enum¶
enum class MouseAction
MouseActionEnumerates possible mouse button actions.
Release enumerator (MouseAction::Release)¶
Mouse button released
Press enumerator (MouseAction::Press)¶
Mouse button pressed
MouseButton enum¶
enum class MouseButton
MouseButtonEnumerates mouse buttons.
Btn1 enumerator (MouseButton::Btn1)¶
Mouse button 1
Btn2 enumerator (MouseButton::Btn2)¶
Mouse button 2
Btn3 enumerator (MouseButton::Btn3)¶
Mouse button 3
Btn4 enumerator (MouseButton::Btn4)¶
Mouse button 4
Btn5 enumerator (MouseButton::Btn5)¶
Mouse button 5
Btn6 enumerator (MouseButton::Btn6)¶
Mouse button 6
Btn7 enumerator (MouseButton::Btn7)¶
Mouse button 7
Btn8 enumerator (MouseButton::Btn8)¶
Mouse button 8
Last enumerator (MouseButton::Last)¶
Last valid mouse button
Left enumerator (MouseButton::Left)¶
Left mouse button (alias for Btn1)
Right enumerator (MouseButton::Right)¶
Right mouse button (alias for Btn2)
Middle enumerator (MouseButton::Middle)¶
Middle mouse button (alias for Btn3)
operator+ function¶
constexpr std::underlying_type_t<MouseButton>
operator+(MouseButton code)
Converts MouseButton to its underlying integer type.
Param code The MouseButton to convert.
Returns The underlying integer value of the MouseButton.
numMouseButtons variable¶
constexpr inline size_t numMouseButtons =
+MouseButton::Last + 1
Number of mouse buttons defined.
mouseButtons variable¶
extern const NameValueOrderedList<MouseButton> mouseButtons
Ordered list mapping MouseButton values to their names.
mouseButtonToString function¶
inline std::string mouseButtonToString(MouseButton btn)
Converts a MouseButton to its string representation.
Param btn The MouseButton to convert.
Returns The string name of the MouseButton, or an empty string if not found.
stringToMouseButton function¶
inline std::optional<MouseButton>
stringToMouseButton(const std::string &str)
Converts a string to a MouseButton.
Param str The string to convert.
Returns The corresponding MouseButton, or std::nullopt if not found.
Cursor enum¶
enum class Cursor : uint32_t
CursorEnumerates cursor types for mouse pointer display.
NotSet enumerator (Cursor::NotSet)¶
No cursor set
Grab enumerator (Cursor::Grab)¶
Grab cursor
GrabDeny enumerator (Cursor::GrabDeny)¶
Grab deny cursor
GrabReady enumerator (Cursor::GrabReady)¶
Grab ready cursor
Arrow enumerator (Cursor::Arrow)¶
Arrow cursor
IBeam enumerator (Cursor::IBeam)¶
I-beam (text) cursor
Crosshair enumerator (Cursor::Crosshair)¶
Crosshair cursor
Hand enumerator (Cursor::Hand)¶
Hand cursor
HResize enumerator (Cursor::HResize)¶
Horizontal resize cursor
VResize enumerator (Cursor::VResize)¶
Vertical resize cursor
NSResize enumerator (Cursor::NSResize)¶
North-South resize cursor
EWResize enumerator (Cursor::EWResize)¶
East-West resize cursor
NESWResize enumerator (Cursor::NESWResize)¶
Northeast-Southwest resize cursor
NWSEResize enumerator (Cursor::NWSEResize)¶
Northwest-Southeast resize cursor
AllResize enumerator (Cursor::AllResize)¶
All directions resize cursor
NotAllowed enumerator (Cursor::NotAllowed)¶
Not allowed cursor
CloseAction enum¶
enum class CloseAction
CloseActionEnumerates actions to take when a window close is requested.
Nothing enumerator (CloseAction::Nothing)¶
No action
Hide enumerator (CloseAction::Hide)¶
Hide the window
Close enumerator (CloseAction::Close)¶
Close the window
WindowStyle enum¶
enum class WindowStyle : int32_t
WindowStyleEnumerates window style flags.
None enumerator (WindowStyle::None)¶
No style
Undecorated enumerator (WindowStyle::Undecorated)¶
Window without decorations
Resizable enumerator (WindowStyle::Resizable)¶
Resizable window
TopMost enumerator (WindowStyle::TopMost)¶
Always-on-top window
ToolWindow enumerator (WindowStyle::ToolWindow)¶
Tool window
Disabled enumerator (WindowStyle::Disabled)¶
Disabled window
Normal enumerator (WindowStyle::Normal)¶
Normal resizable window
Dialog enumerator (WindowStyle::Dialog)¶
Dialog-style window
WindowState enum¶
enum class WindowState : int32_t
WindowStateEnumerates window states.
Normal enumerator (WindowState::Normal)¶
Normal window state
Maximized enumerator (WindowState::Maximized)¶
Maximized window state
Minimized enumerator (WindowState::Minimized)¶
Minimized window state
DragEvent enum¶
enum class DragEvent : int32_t
DragEventEnumerates drag-and-drop event types.
None enumerator (DragEvent::None)¶
No drag event
Started enumerator (DragEvent::Started)¶
Drag started
Dragging enumerator (DragEvent::Dragging)¶
Dragging in progress
Dropped enumerator (DragEvent::Dropped)¶
Drag dropped
SvgCursor class¶
SvgCursor
SvgCursorRepresents a custom SVG-based cursor.
svg variable (SvgCursor::svg)¶
std::string svg
SVG content for the cursor
hotspot variable (SvgCursor::hotspot)¶
Point hotspot
Hotspot position for the cursor
size variable (SvgCursor::size)¶
constexpr static Size size
Nominal size for the SVG cursor.
Auto-generated from sources, Revision , https://github.com/brisklib/brisk/blob//include/brisk/