Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
EditorApp.h File Reference

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 <optional>
#include <string_view>
#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/UndoTimeline.h"
#include "donner/svg/DonnerController.h"
#include "donner/svg/SVGElement.h"
#include "donner/svg/SVGGeometryElement.h"
Include dependency graph for EditorApp.h:
This graph shows which files directly or indirectly include this file:

Classes

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.

Detailed Description

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/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.


Class Documentation

◆ donner::editor::EditorApp::CompletedTransformWriteback

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.

Collaboration diagram for donner::editor::EditorApp::CompletedTransformWriteback:
[legend]
Class Members
bool restoreSourceTransformAttributeValue = false
optional< RcString > sourceTransformAttributeValue
AttributeWritebackTarget target
Transform2d transform

◆ donner::editor::EditorApp::CompletedElementRemoveWriteback

struct donner::editor::EditorApp::CompletedElementRemoveWriteback
Collaboration diagram for donner::editor::EditorApp::CompletedElementRemoveWriteback:
[legend]
Class Members
AttributeWritebackTarget target