Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::UndoRecord Class Reference

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

#include "donner/editor/TextEditorCore.h"

Collaboration diagram for donner::editor::UndoRecord:
[legend]

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: