|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Owns source-pane debounce, parse-error markers, and XML-owned source view mirroring. More...
#include "donner/editor/DocumentSyncController.h"
Public Member Functions | |
| DocumentSyncController (std::string initialSource) | |
| void | resetForLoadedDocument (const std::string &source) |
| void | syncParseErrorMarkers (EditorApp &app, TextEditor &textEditor) |
| bool | mirrorSourceDeltas (EditorApp &app, TextEditor &textEditor, const std::vector< xml::XMLSourceDelta > &sourceDeltas) |
| Mirror XML-owned source deltas into the source pane. | |
| void | handleTextEdits (EditorApp &app, TextEditor &textEditor, float deltaSeconds) |
| std::optional< float > | nextTextSyncWakeSeconds () const |
| Return the pending source-text sync wake interval, if a throttled edit is waiting. | |
| void | applyPendingWritebacks (EditorApp &app, SelectTool &selectTool, TextEditor &textEditor) |
Owns source-pane debounce, parse-error markers, and XML-owned source view mirroring.
| bool donner::editor::DocumentSyncController::mirrorSourceDeltas | ( | EditorApp & | app, |
| TextEditor & | textEditor, | ||
| const std::vector< xml::XMLSourceDelta > & | sourceDeltas ) |
Mirror XML-owned source deltas into the source pane.
Use this when a canvas/DOM operation already mutated the XML document and returned xml::XMLSourceDelta records. The controller replays the deltas into textEditor with source-change suppression and falls back to mirroring the document source if the delta sequence cannot be applied precisely.
| app | Editor app containing the source-backed document. |
| textEditor | Source pane to update. |
| sourceDeltas | Source deltas emitted by the XML document. |