History

The edits of a control manager that can be undone and redone: changes of the values of controls by the user, of the keyframes of timelines, of the order of lists and of the layouts of docks. The commands Undo (mod+z) and Redo (mod+shift+z) go through it. A history that is not enabled records nothing, like when the program has a history of its own.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val changed: Event<History>

an edit was recorded, undone or redone

Link copied to clipboard

false to record nothing

Link copied to clipboard
var limit: Int

the largest number of edits that are kept

Link copied to clipboard

the name of the edit that redo redoes, null when there is none

Link copied to clipboard

the name of the edit that undo undoes, null when there is none

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun record(edit: Edit)

records edit

fun <T> record(name: String, key: Any?, old: T, new: T, apply: (T) -> Unit)

Records the change of a value from old to new that apply sets, merged with the previous edit of the same key in the same gesture, or within half a second for keys

Link copied to clipboard
fun redo(): Boolean

redoes the last edit that was undone, false when there is none

Link copied to clipboard
fun undo(): Boolean

undoes the last edit, false when there is none