Class UndoBuffer

Undo/Redo buffer

class UndoBuffer;

Fields

NameTypeDescription
_redoList Collection!(dcanvas.core.editable.EditOperation,false)
_savedState EditOperation
_undoList Collection!(dcanvas.core.editable.EditOperation,false)

Properties

NameTypeDescription
hasRedo[get] boolreturns true if buffer contains any redo items
hasUndo[get] boolreturns true if buffer contains any undo items
modified[get] boolreturns true if content has been changed since last saved() or clear() call

Methods

NameDescription
clear () clears both undo and redo buffers
redo () returns operation to be redone (put it to undo), null if no undo ops available
saved () current state is saved
savedInRedo () returns true if saved state is in redo buffer
saveForUndo (op) adds undo operation
undo () returns operation to be undone (put it to redo), null if no undo ops available

Aliases

NameDescription
~this