|
|
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.
|
EditorApp is the editor's top-level shell - the mutation-seam frontend that tools and the main loop interact with. Owns the AsyncSVGDocument, the active selection, and (eventually) the active tool dispatcher. More...
#include <cstdint>#include <optional>#include <string>#include <string_view>#include <utility>#include <vector>#include "donner/base/Box.h"#include "donner/base/Transform.h"#include "donner/base/Vector2.h"#include "donner/editor/AsyncSVGDocument.h"#include "donner/editor/AttributeWriteback.h"#include "donner/editor/EditorCommand.h"#include "donner/editor/LockState.h"#include "donner/editor/UndoTimeline.h"#include "donner/svg/DonnerController.h"#include "donner/svg/SVGElement.h"#include "donner/svg/SVGGeometryElement.h"Classes | |
| struct | donner::editor::PathOperationAvailability |
| Whether a path operation can currently be applied to the editor selection. More... | |
| struct | donner::editor::GroupOperationAvailability |
| Whether a lossless group or ungroup operation can currently be applied. More... | |
| struct | donner::editor::ActivePaintStyle |
| Active paint settings used by authoring tools when creating new geometry. More... | |
| class | donner::editor::EditorApp |
| Top-level editor shell. More... | |
| struct | donner::editor::EditorApp::CompletedTransformWriteback |
| Payload describing a completed DOM-side transform mutation that needs to be spliced into the source text. target is a stable path-based reference captured while the source was still in sync with the DOM; transform is the local (parent-space) transform that should appear in the element's transform= attribute. More... | |
| struct | donner::editor::EditorApp::CompletedElementRemoveWriteback |
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::PathOperationKind : std::uint8_t { Union , Intersect , SubtractFront , SubtractBack , Exclude } |
| Boolean-style path operation exposed by the editor path operations panel. | |
Functions | |
| bool | donner::editor::IsLockGatedCommand (const EditorCommand &command) |
Whether command is a geometry-changing or destructive mutation targeting a locked element and must be dropped by the edit-gating path. Returns true only for SetTransform / DeleteElement whose target IsLocked (which also covers descendants of a locked group). Everything else - attribute and visibility/lock toggles, inserts, text edits, document replacement - is allowed, so a locked layer can still be shown/hidden, selected, and unlocked. | |
EditorApp is the editor's top-level shell - the mutation-seam frontend that tools and the main loop interact with. Owns the AsyncSVGDocument, the active selection, and (eventually) the active tool dispatcher.
Per docs/design_docs/0020-editor.md, all editor-initiated DOM writes flow through EditorApp::applyMutation(). Tools never call SVGElement::setTransform() directly - they build EditorCommands and hand them to the editor.
This is deliberately smaller than the prototype's SVGState / EditorApp aggregates: no path-tool wiring, no overlay document, no canvas pan/zoom state (that lives at the main-loop layer where it belongs). It is just enough surface for SelectTool to do its job.
| struct donner::editor::EditorApp::CompletedTransformWriteback |
Payload describing a completed DOM-side transform mutation that needs to be spliced into the source text. target is a stable path-based reference captured while the source was still in sync with the DOM; transform is the local (parent-space) transform that should appear in the element's transform= attribute.
| Class Members | ||
|---|---|---|
| bool | restoreSourceTransformAttributeValue = false | |
| optional< RcString > | sourceTransformAttributeValue | |
| AttributeWritebackTarget | target | |
| Transform2d | transform | |
| struct donner::editor::EditorApp::CompletedElementRemoveWriteback |
| Class Members | ||
|---|---|---|
| AttributeWritebackTarget | target | |