|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Directories | |
| app | |
| gui | |
| repro | |
| sandbox | |
Files | |
| AsyncRenderer.h | |
| AsyncRenderer owns a svg::Renderer and runs compositor rendering plus any final presentation snapshot handoff on a dedicated worker thread so heavy renders don't block the UI thread. | |
| AsyncSVGDocument.h | |
| AsyncSVGDocument is the editor-owned wrapper around svg::SVGDocument that gates DOM mutations through the CommandQueue and provides the snapshot hand-off to the render thread described in the M1.5 design note in docs/design_docs/editor.md. | |
| AttributeWriteback.h | |
| Builds a TextPatch that updates an SVG element's attribute in the source text. This is the bridge between a canvas tool mutation (e.g. a drag that changes transform) and the source pane. | |
| ChangeClassifier.h | |
| Classifies a text edit as either an attribute-value change on a specific element (fast path → SetAttributeCommand) or a structural change (fallback → ReplaceDocumentCommand). This is the M5 gate: when structured editing is enabled, the main loop calls classifyTextChange instead of unconditionally emitting a ReplaceDocumentCommand. | |
| ClipboardInterface.h | |
| Abstract clipboard interface used by the editor's text-editor core (see text_editor_refactor.md). Decouples copy/cut/paste from ImGui so headless unit tests can inject an in-memory implementation instead of requiring an ImGui context. | |
| CommandQueue.h | |
| CommandQueue is the per-frame EditorCommand queue described in the "AsyncSVGDocument: single-threaded command queue" section of docs/design_docs/editor.md. It accumulates editor-initiated DOM mutations on the UI thread and coalesces them at flush time. | |
| CompositedPresentation.h | |
| DialogPresenter.h | |
| DocumentSave.h | |
| DocumentSyncController.h | |
| DragCoalesce.h | |
| Drag coalesce policy: decides whether the editor should forward the current mouse position to the backend as a kMove pointer event, or drop it and wait for the in-flight response. | |
| EditorApp.h | |
| 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. | |
| EditorCommand.h | |
| EditorCommand is the discriminated union of every UI-thread→DOM mutation in the M2 scope of the editor. New tools (path, node-edit, etc.) extend this variant in their own follow-up milestones — one new case per logical operation, NOT one per ECS write. | |
| EditorInputBridge.h | |
| EditorShell.h | |
| EditorShellLayout.h | |
| FlashDecorations.h | |
| FocusView.h | |
| FrameCostBreakdown.h | |
| FrameMissTelemetry.h | |
| GlTextureCache.h | |
| ImGuiBackendIncludes.h | |
| ImGuiClipboard.h | |
| Production ClipboardInterface implementation backed by ImGui's clipboard functions (ImGui::GetClipboardText / SetClipboardText). | |
| ImGuiIncludes.h | |
| ImGuiInternalIncludes.h | |
| InMemoryClipboard.h | |
| Header-only in-memory implementation of ClipboardInterface. Stores a single std::string in the object — no OS / ImGui interaction. | |
| KeyboardShortcutPolicy.h | |
| LayerInspectorDiagnostics.h | |
| LayerInspectorPanel.h | |
| Read-only diagnostic panel that exposes the live compositor's composite state — every tile (background, foreground, segments, layers) the renderer blits to produce the final frame, displayed in paint order with a thumbnail per tile. | |
| MenuBarPresenter.h | |
| OverlayRenderer.h | |
| OverlayRenderer draws editor chrome (currently selection path outlines) directly into the renderer's existing framebuffer using the canvas primitives RendererInterface already exposes. It is not a separate compositing layer and not a fabricated SVG subtree — chrome and document share one render target so there is no subpixel drift between them. | |
| PenTool.h | |
| Prototype path authoring tool. PenTool creates source-backed <path> elements and appends straight line segments from document-space clicks. | |
| PinchEventMonitor.h | |
| Platform-specific render-pane pinch gesture capture. On macOS this installs a local magnify-event monitor and feeds synthetic zoom scroll events into the existing editor queue. | |
| PresentationRenderScheduler.h | |
| PresentedFrameComposer.h | |
| ReferenceFanout.h | |
| RenderCoordinator.h | |
| RenderPaneGesture.h | |
| Headless classification for render-pane scroll gestures. main.cc feeds raw GLFW scroll events into this helper so tests can cover pan vs. zoom routing without depending on ImGui or GLFW. | |
| RenderPanePresenter.h | |
| RopeSimulation.h | |
| RotateCursorSet.h | |
| SelectionAabb.h | |
| SelectionTransformHandles.h | |
| SelectTool.h | |
| SelectTool is the editor's first and (in this milestone) only tool. It dispatches three different gestures off onMouseDown: | |
| SidebarPresenter.h | |
| SoftWrap.h | |
| SourceEditIntent.h | |
| SourceSelection.h | |
| SourceSync.h | |
| Helpers for keeping the source pane, command queue, and DOM parse state in sync when editor-owned code writes bytes back into the text buffer. | |
| StyleSourceAnnotations.h | |
| TextBuffer.h | |
| TextEditor.h | |
| TextEditorCore.h | |
| Headless editing substrate for the ImGui TextEditor widget. | |
| TextPatch.h | |
| The TextPatch type and applyPatches function form the editor's canvas-to-text writeback sideband. When a tool mutates an attribute via EditorApp::applyMutation, it also produces a TextPatch that describes the corresponding byte-level splice in the source text. The main loop drains pending patches after flushFrame() and before rendering the source pane. | |
| Tool.h | |
| Tool is the abstract interface for editor pointer tools (Select, future Path, future Node-edit, etc.). Tools observe the editor state via the EditorApp& parameter and produce DOM mutations exclusively by calling EditorApp::applyMutation() — they never touch the DOM directly. | |
| TracyWrapper.h | |
| Conditional Tracy profiling macros for the editor. When ENABLE_TRACY is defined, the real Tracy profiler client is included; otherwise the macros expand to no-ops so editor code can be instrumented unconditionally. | |
| UndoTimeline.h | |
| ViewportGeometry.h | |
| ViewportInteractionController.h | |
| ViewportState.h | |
| ViewportState is the single source of truth for the editor render pane's screen↔document coordinate mapping. See docs/design_docs/0025-editor_ux.md for the full design rationale; this header is the public API. | |
| XmlAutocomplete.h | |
The Donner editor is a browser-based and desktop SVG editor built on top of the Donner SVG engine. It uses a sandbox architecture to isolate the parser child from the host, communicating via a wire format that the ReplayingRenderer decodes onto whatever RendererInterface backend was selected at build time.
The editor target applies a Geode transition internally, so no --config=geode flag is needed for the desktop editor.
editor_impl is the untransitioned implementation target and inherits the command-line renderer backend. It is primarily useful for backend debugging.
The editor uses the backend-agnostic Renderer wrapper (donner/svg/renderer/Renderer.h). The public desktop editor target selects Geode at build time with a Bazel transition; the editor WASM config also selects Geode by default. No runtime flags or C++ code branches are needed:
| Target / config | Backend |
|---|---|
| //donner/editor | Geode - WebGPU + Slug |
| --config=editor-wasm | Geode - browser WebGPU |
| //donner/editor:editor_impl | Inherits command-line renderer flag |
Desktop presentation is also selected at build time: