|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Toolbar tool icons, rendered from embedded two-tone SVG art through Donner. Black cores and white halos are preserved so the toolbar and OS cursors use one contrast system on every surface (see donner/editor/art/STYLE.md). More...
#include <array>#include <cstdint>#include <functional>#include <optional>#include <span>#include "donner/base/Vector2.h"#include "donner/editor/ImGuiIncludes.h"#include "donner/svg/renderer/RendererInterface.h"Classes | |
| struct | donner::editor::ToolbarIconTexture |
| An uploaded icon texture plus the valid payload UV range (icon bitmaps may be padded to a texture-friendly size). More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Typedefs | |
| using | donner::editor::ToolbarIconTextureProvider |
| Uploads a Donner-rendered icon mask bitmap to an ImGui texture. Mirrors the IconTextureProvider callbacks the layers/inspector panels already pass down, so the shell reuses one texture-upload path. | |
Enumerations | |
| enum class | donner::editor::ToolbarIcon : std::uint8_t { Select , Pen , Text } |
| A tool that has a toolbar icon. Mirrors the palette buttons in display order; kept standalone so the registry-coverage test can iterate it without a live ImGui context. More... | |
Functions | |
| std::span< const unsigned char > | donner::editor::ToolbarIconSvg (ToolbarIcon icon) |
Embedded SVG source bytes for icon. | |
| std::uint64_t | donner::editor::ToolbarIconTextureKey (ToolbarIcon icon) |
Stable texture-cache key for icon. | |
| const std::optional< svg::RendererBitmap > & | donner::editor::CachedToolbarIconBitmap (ToolbarIcon icon) |
The Donner-rendered two-tone bitmap for icon, rendered once and cached for the process lifetime. std::nullopt if parsing/rendering failed. | |
| void | donner::editor::DrawToolbarIcon (ToolbarIcon icon, const ImVec2 &min, const ImVec2 &max, ImU32 tintColor, const ToolbarIconTextureProvider &provider) |
Draw icon centered within the button rect [min, max], tinted with tintColor. No-op when provider is null or the icon can't be uploaded (e.g. headless tests with no GL context), leaving the button blank rather than crashing. | |
Variables | |
| constexpr std::array< ToolbarIcon, 3 > | donner::editor::kToolbarIcons |
| Every toolbar icon, in palette order. The single source of truth for the icon registry and its coverage test. | |
Toolbar tool icons, rendered from embedded two-tone SVG art through Donner. Black cores and white halos are preserved so the toolbar and OS cursors use one contrast system on every surface (see donner/editor/art/STYLE.md).
Uploads a Donner-rendered icon mask bitmap to an ImGui texture. Mirrors the IconTextureProvider callbacks the layers/inspector panels already pass down, so the shell reuses one texture-upload path.
|
strong |
|
inlineconstexpr |
Every toolbar icon, in palette order. The single source of truth for the icon registry and its coverage test.