Undo stack manager.
Check if redo is available.
Check if undo is available.
Clear both stacks.
Push an action onto the undo stack.
Pop and return the last redoable action.
Pop and return the last undoable action.
Undo stack manager.