undo/redo manager for openFrameworks
README
ofxUndo
undo/redo manager for openFrameworks
Usage
ofxUndoSimple
ofxUndoSimple directly stores data into history by equal(=) operator. Declare ofxUndoSimple with typename like
ofxUndoSimple<ofVec2f> or ofxUndoSimple<MyStruct>. That's all you have to do to use this. NOTICE : It doesn't do anything like deep-copying. Be careful when you use it for pointers or structs that has pointers. ofxUndoFile
ofxUndoFile provides interfaces for file I/O. Extend ofxUndoFile and implement
save/load functions. ofxUndoJson
ofxUndoJson makes it easier to store history in
ofJson format. Declare ofxUndoJson with typename like ofxUndoJson<MyStruct>. Then implement toJson/loadJson in MyStruct. I strongly recommend to use this class with @2bbb's ofxJsonUtils
ofxUndoCommandManager
ofxUndoCommandManager stores history as command data such as diffs or operations. Implement undo/redo members in ofxUndoCommand and pass it to Manager. Since the Manager expects commands as pointers, you can use any class by extending ofxUndoCommand.
ofxUndoGroup
With ofxUndoGroup, you can bind multiple ofxUndo-instances together. NOTICE: Don't undo/redo child instances directly while they belong to any group.
example-ofParameterGroup
Handles an
ofParameterGroup filled with ofParameters. Included testing scene.
ofxAddons