|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Represents a keyboard shortcut for editor actions. More...
#include "donner/editor/TextEditor.h"
Public Member Functions | |
| Shortcut ()=default | |
| Default constructor. | |
| Shortcut (ImGuiKey k, ShortcutModifier m=ShortcutModifier::None) | |
| Constructs a shortcut with a single key and optional modifiers. | |
| Shortcut (ImGuiKey k1, ImGuiKey k2, ShortcutModifier m=ShortcutModifier::None) | |
| Constructs a shortcut with two keys and optional modifiers. | |
| bool | matches (const ImGuiIO &io) const |
| Checks if this shortcut matches the current input state. | |
Public Attributes | |
| ImGuiKey | key1 = ImGuiKey_None |
| Primary key (required). | |
| ImGuiKey | key2 = ImGuiKey_None |
| Secondary key (optional). | |
| ShortcutModifier | modifiers = ShortcutModifier::None |
| Combined modifiers. | |
Represents a keyboard shortcut for editor actions.
A shortcut consists of up to two keys and optional modifier keys.
|
inline |
Constructs a shortcut with a single key and optional modifiers.
| k | Primary key. |
| m | Modifier flags combined using bitwise OR. |
|
inline |
Constructs a shortcut with two keys and optional modifiers.
| k1 | Primary key. |
| k2 | Secondary key. |
| m | Modifier flags combined using bitwise OR. |
|
inline |
Checks if this shortcut matches the current input state.
Compares the set keys and modifiers against the keys currently pressed.
| io | Reference to ImGuiIO containing the current keyboard state. |