|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
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 |
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.