OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_UndoableAction.h>
Inherited by juce::ValueTree::SharedObject::AddOrRemoveChildAction, juce::ValueTree::SharedObject::MoveChildAction, and juce::ValueTree::SharedObject::SetPropertyAction.
Public Member Functions | |
virtual | ~UndoableAction ()=default |
virtual bool | perform ()=0 |
virtual bool | undo ()=0 |
virtual int | getSizeInUnits () |
virtual UndoableAction * | createCoalescedAction (UndoableAction *nextAction) |
Protected Member Functions | |
UndoableAction ()=default | |
Used by the UndoManager class to store an action which can be done and undone.
Definition at line 39 of file juce_UndoableAction.h.
|
protecteddefault |
Creates an action.
|
virtualdefault |
Destructor.
|
inlinevirtual |
Allows multiple actions to be coalesced into a single action object, to reduce storage space.
If possible, this method should create and return a single action that does the same job as this one followed by the supplied action.
If it's not possible to merge the two actions, the method should return a nullptr.
Definition at line 98 of file juce_UndoableAction.h.
Returns a value to indicate how much memory this object takes up.
Because the UndoManager keeps a list of UndoableActions, this is used to work out how much space each one will take up, so that the UndoManager can work out how many to keep.
The default value returned here is 10 - units are arbitrary and don't have to be accurate.
Definition at line 89 of file juce_UndoableAction.h.
Overridden by a subclass to perform the action.
This method is called by the UndoManager, and shouldn't be used directly by applications.
Be careful not to make any calls in a perform() method that could call recursively back into the UndoManager::perform() method
Overridden by a subclass to undo the action.
This method is called by the UndoManager, and shouldn't be used directly by applications.
Be careful not to make any calls in an undo() method that could call recursively back into the UndoManager::perform() method