History

class History(val document: HistoryDocument)

Constructors

Link copied to clipboard
constructor(document: HistoryDocument)

Types

Link copied to clipboard
inner class BatchImpl(label: String) : Batch

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

true if the document was last saved at the current point in the history. i.e. it returns true immediately after saved is called, but also returns true if changes are made, and then undo is performed to get back to the point that saved was called.

Link copied to clipboard
Link copied to clipboard

The time between changes in milliseconds, where changes can be merged. The default is 1 second (1000 milliseconds). i.e. if we type with less than 1 second between keystrokes, the changes will be merged to form a single batch, so undo/redo will not operate 1 character at a time.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun batch(block: Batch.() -> Unit)

fun batch(label: String = "", block: Batch.() -> Unit)

Begins a new Batch, runs the block, and then closes the Batch.

Link copied to clipboard
fun beginBatch(label: String = ""): Batch
Link copied to clipboard
fun clear()
Link copied to clipboard
Link copied to clipboard
fun endBatch()
Link copied to clipboard
Link copied to clipboard
fun redo(skipSelectionChanges: Boolean = false): Change?
Link copied to clipboard
fun saved()
Link copied to clipboard
fun undo(skipSelectionChanges: Boolean = false): Change?