addEdit
addEdit: (UndoManager, UndoableEdit) -> booleanAdds anEdit after the done edits (the undone ones are dropped, then the list is trimmed to the limit). Always true.
UndoManager.new()| Method | Returns | Description |
|---|---|---|
addEdit(UndoableEdit) | boolean | Adds anEdit after the done edits (the undone ones are dropped, then the list is trimmed to the limit). Always true. |
undoableEditHappened(UndoableEditEvent) | () | An UndoableEditListener that adds every edit it hears (document:addUndoableEditListener(undoManager)). |
canUndo() | boolean | Whether there is an edit to undo. |
canRedo() | boolean | Whether there is an edit to redo. |
undo() | () | Undoes the last done edit: its inverse applied to the document, heard by its DocumentListeners. Nothing to undo raises `CannotUndoExcepti… |
redo() | () | Redoes the last undone edit. Nothing to redo raises CannotRedoException. |
getLimit() | number | The most edits it keeps, as last set (100 until then); below 0, any number. |
setLimit(number) | () | Keeps at most l edits; below 0, any number. |
discardAllEdits() | () | Forgets every edit. |
getUndoPresentationName() | string | "Undo addition", ...; "Undo" with nothing to undo. |
getRedoPresentationName() | string | "Redo addition", ...; "Redo" with nothing to redo. |
new() | UndoManager | An empty manager. |
| Method | Returns | Description |
|---|---|---|
UndoManagerClass.new | UndoManager | An empty manager. |
addEditaddEdit: (UndoManager, UndoableEdit) -> booleanAdds anEdit after the done edits (the undone ones are dropped, then the list is trimmed to the limit). Always true.
undoableEditHappenedundoableEditHappened: (UndoManager, UndoableEditEvent) -> ()An UndoableEditListener that adds every edit it hears (document:addUndoableEditListener(undoManager)).
canUndocanUndo: (UndoManager) -> booleanWhether there is an edit to undo.
canRedocanRedo: (UndoManager) -> booleanWhether there is an edit to redo.
undoundo: (UndoManager) -> ()Undoes the last done edit: its inverse applied to the document, heard by its DocumentListeners. Nothing to undo raises CannotUndoException.
redoredo: (UndoManager) -> ()Redoes the last undone edit. Nothing to redo raises CannotRedoException.
getLimitgetLimit: (UndoManager) -> numberThe most edits it keeps, as last set (100 until then); below 0, any number.
setLimitsetLimit: (UndoManager, number) -> ()Keeps at most l edits; below 0, any number.
discardAllEditsdiscardAllEdits: (UndoManager) -> ()Forgets every edit.
getUndoPresentationNamegetUndoPresentationName: (UndoManager) -> string"Undo addition", ...; "Undo" with nothing to undo.
getRedoPresentationNamegetRedoPresentationName: (UndoManager) -> string"Redo addition", ...; "Redo" with nothing to redo.
newnew: () -> UndoManagerAn empty manager.