UndoableStack

Implements an undoable event list with automatic handling of undo/redo commands

Constructors

this
this(size_t maxElements)
Undocumented in source.

Members

Aliases

EventStack
alias EventStack = LinkedList!(UndoableEvent)
Undocumented in source.

Functions

addToTop
void addToTop(UndoableEvent e)

Adds an event to the top of the stack. If there are any undone events, they'll be lost. Bottom event is always lost.

length
size_t length()

Returns the length of the current stack

redo
void redo()

Redos top event.

undo
void undo()

Undos top event.

Variables

currentCap
size_t currentCap;
Undocumented in source.
currentPos
size_t currentPos;
Undocumented in source.
events
EventStack events;
maxLength
size_t maxLength;
Undocumented in source.

Meta