Canonical editor tool identity plus its industry-standard single-key shortcut and display label. Kept as a tiny pure header (no ImGui, no EditorShell) so the toolbar tooltip text and the keyboard shortcut handler share one source of truth and the mapping can be unit-tested without a live ImGui/GL context. More...
#include <array>#include <cstdint>#include <string_view>Classes | |
| struct | donner::editor::ToolKeybinding |
| Display label and single-key shortcut for a tool. key is the binding design-tool users expect (Selection = V, Pen = P, Type = T); label is the tool's human name. The toolbar renders the tooltip as "<label> (<key>)". More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::editor::ToolId : std::uint8_t { Select , Pen , Text , Eyedropper } |
| The editor's interactive tools. Mirrors EditorShell::ActiveTool one-to-one; kept as a standalone enum so the keybinding mapping is testable in isolation. More... | |
Functions | |
| constexpr ToolKeybinding | donner::editor::KeybindingForTool (ToolId tool) |
| Map a tool to its display label and standard shortcut key. | |
Variables | |
| constexpr std::array< ToolId, 4 > | donner::editor::kToolbarTools |
| The full toolbar tool list in display (top-to-bottom) order. The single source of truth shared by the toolbar buttons, the tooltip text, and the keyboard shortcut handler. | |
Canonical editor tool identity plus its industry-standard single-key shortcut and display label. Kept as a tiny pure header (no ImGui, no EditorShell) so the toolbar tooltip text and the keyboard shortcut handler share one source of truth and the mapping can be unit-tested without a live ImGui/GL context.
|
strong |
|
inlineconstexpr |
The full toolbar tool list in display (top-to-bottom) order. The single source of truth shared by the toolbar buttons, the tooltip text, and the keyboard shortcut handler.