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.
Loading...
Searching...
No Matches
donner::editor::UndoRecord Class Reference

Record of a single text mutation for undo/redo. More...

#include "donner/editor/TextEditorCore.h"

Public Member Functions

 UndoRecord (std::string_view added, const Coordinates &addedStart, const Coordinates &addedEnd, std::string_view removed, const Coordinates &removedStart, const Coordinates &removedEnd, const EditorState &before, const EditorState &after)
void undo (TextEditorCore *core)
void redo (TextEditorCore *core)

Public Attributes

RcString added
Coordinates addedStart
Coordinates addedEnd
RcString removed
Coordinates removedStart
Coordinates removedEnd
EditorState before
EditorState after

Detailed Description

Record of a single text mutation for undo/redo.

Stores the text added, the text removed, and the editor state before and after the mutation. undo reverses the mutation by removing the added text and re-inserting the removed text; redo replays it.


The documentation for this class was generated from the following file: