|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
An undoable edit. More...
#include <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/Command.h>
Inherited by DekiEditor::CompoundCommand.
Public Member Functions | |
| virtual | ~Command ()=default |
| virtual std::string | GetDescription () const =0 |
| Human-readable text shown in the UI, in the editor's current language. | |
| virtual void | Execute ()=0 |
| virtual void | Undo ()=0 |
| virtual void | Redo () |
| Calls Execute by default. | |
| virtual bool | CanMerge (const Command *other) const |
| Whether other can be folded into this command. | |
| virtual void | Merge (const Command *other) |
| Folds other into this command. | |
| virtual bool | ReferencesAny (const DeadMemory &dead) const |
| Whether this command holds a raw pointer to anything in dead. | |
An undoable edit.
|
virtualdefault |
|
pure virtual |
Human-readable text shown in the UI, in the editor's current language.
Implemented in DekiEditor::CompoundCommand.
|
pure virtual |
Implemented in DekiEditor::CompoundCommand.
|
pure virtual |
Implemented in DekiEditor::CompoundCommand.
|
inlinevirtual |
Calls Execute by default.
Reimplemented in DekiEditor::CompoundCommand.
|
inlinevirtual |
Whether other can be folded into this command.
|
inlinevirtual |
Folds other into this command.
|
inlinevirtual |
Whether this command holds a raw pointer to anything in dead.
CommandHistory asks this when the scene is about to free objects and discards any command that answers true, since Undo()/Redo() on a freed target is a use-after-free.
The default, false, is right for commands that address their target by value or by id. Any command storing a Deki::Object*, Deki::Component* or Scene* MUST override this; see src/core/commands/ for the pattern.
Reimplemented in DekiEditor::CompoundCommand.