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>
|
| 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...
|
|
| enum class | donner::editor::ToolId : std::uint8_t {
Select
,
Pen
,
Text
} |
| | 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...
|
|
|
constexpr ToolKeybinding | donner::editor::KeybindingForTool (ToolId tool) |
| | Map a tool to its display label and standard shortcut key.
|
|
| constexpr std::array< ToolId, 3 > | 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.
◆ ToolId
The editor's interactive tools. Mirrors EditorShell::ActiveTool one-to-one; kept as a standalone enum so the keybinding mapping is testable in isolation.
| Enumerator |
|---|
| Select | Selection / Arrow tool.
|
| Pen | Pen (path) tool.
|
| Text | Type / Text tool.
|
◆ kToolbarTools
| std::array<ToolId, 3> donner::editor::kToolbarTools |
|
inlineconstexpr |
Initial value:
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.