Class type Goog.​Geditor.​Plugins.​undoRedoManager

class type undoRedoManager = object..end

Inherits


method addState : undoRedoState Js.t -> unit Js.meth

Add state to the undo stack. This clears the redo stack.

method clearHistory : unit Js.meth

Clear the undo/redo stack.

method hasRedoState : bool Js.t Js.meth

Returns Wether the redo stack has items on it, i.e., if it is possible to perform a redo operation.

method hasUndoState : bool Js.t Js.meth

Returns Wether the undo stack has items on it, i.e., if it is possible to perform an undo operation.

method redo : unit Js.meth

Performs the redo operation of the state at the top of the redo stack, moving that state to the top of the undo stack. If redo undo stack is empty, does nothing.

method redoPeek : undoRedoState Js.t Js.optdef Js.meth

Returns The state at the top of the redo stack without removing it from the stack.

method setMaxUndoDepth : int -> unit Js.meth

Set the max undo stack depth (not the real memory usage).

method undo : unit Js.meth

Performs the undo operation of the state at the top of the undo stack, moving that state to the top of the redo stack. If the undo stack is empty, does nothing.

method undoPeek : undoRedoState Js.t Js.optdef Js.meth

Returns The state at the top of the undo stack without removing it from the stack.