Sunday, December 20, 2009

Supporting Undo/Redo

Notes taken from the following post: New CodePlex project: a simple Undo/Redo framework

I will need to implement undo/redo to one of my projects. Each action must have a meaningful name to show in the UI.

1- Define an interface IAction
void Execute();
void UnExecute();
bool CanExecute();
bool CanUnExecute();

2- Define an ActionManager
void RecordAction(IAction); //adds an action the the actions vector
void Undo()
void Redo();
bool CanUndo();
bool CanRedo();

No comments:

Post a Comment