C# Class GuiLabs.Undo.SimpleHistory

IActionHistory represents a recorded list of actions undertaken by user. This class implements a usual, linear action sequence. You can move back and forth changing the state of the respective document. When you move forward, you execute a respective action, when you move backward, you Undo it (UnExecute). Implemented through a double linked-list of SimpleHistoryNode objects. ====================================================================
Inheritance: IActionHistory
Datei anzeigen Open project: KirillOsenkov/Undo Class Usage Examples

Public Methods

Method Description
AppendAction ( IAction newAction ) : bool

Adds a new action to the tail after current state. If there exist more actions after this, they're lost (Garbage Collected). This is the only method of this class that actually modifies the linked-list.

Clear ( ) : void

All existing Nodes and Actions are garbage collected.

EnumRedoableActions ( ) : IEnumerable
EnumUndoableActions ( ) : IEnumerable
GetEnumerator ( ) : IEnumerator
MoveBack ( ) : void
MoveForward ( ) : void
SimpleHistory ( ) : System

Protected Methods

Method Description
RaiseUndoBufferChanged ( ) : void

Private Methods

Method Description
Init ( ) : void
System ( ) : System.Collections.IEnumerator

Method Details

AppendAction() public method

Adds a new action to the tail after current state. If there exist more actions after this, they're lost (Garbage Collected). This is the only method of this class that actually modifies the linked-list.
public AppendAction ( IAction newAction ) : bool
newAction IAction Action to be added.
return bool

Clear() public method

All existing Nodes and Actions are garbage collected.
public Clear ( ) : void
return void

EnumRedoableActions() public method

public EnumRedoableActions ( ) : IEnumerable
return IEnumerable

EnumUndoableActions() public method

public EnumUndoableActions ( ) : IEnumerable
return IEnumerable

GetEnumerator() public method

public GetEnumerator ( ) : IEnumerator
return IEnumerator

MoveBack() public method

public MoveBack ( ) : void
return void

MoveForward() public method

public MoveForward ( ) : void
return void

RaiseUndoBufferChanged() protected method

protected RaiseUndoBufferChanged ( ) : void
return void

SimpleHistory() public method

public SimpleHistory ( ) : System
return System