Module state
Expand description
A document and the history it keeps, below the toolkit: the primitive that writes a past state forward as a new change, which undo, redo and restore all write through.
The toolkit (ui::state) builds its State on this and keeps its paths.
Structs§
- Undo
Entry - One step of the history as a window shows it: the changes it brackets, where the caret was, and who made it.
- UndoLog
- A document’s undo, as one window drives it. See the module docs.
Functions§
- write_
patches - Write an already-derived patch set forward into
doc’s open transaction. - write_
revert_ patches - Write the delta that leads from
from_headstoto_headsintodoc’s open transaction, without committing. - write_
revert_ patches_ where write_revert_patchesfor only the patcheskeepaccepts: a restore of some items of a past version, or of everything but bookkeeping. The rest stay in the patch stream unwritten, so the indices of later sequence patches still line up. Returns how many patches were written.
Type Aliases§
- Instance
Id - A window instance of an app, as the runtime numbers it.