Stores the undo / redo stacks of transactions done on a document.
More...
#include <CommandHistory.h>
|
| ezCommandHistory (ezDocument *pDocument) |
|
const ezDocument * | GetDocument () const |
|
ezStatus | Undo (ezUInt32 uiNumEntries=1) |
|
ezStatus | Redo (ezUInt32 uiNumEntries=1) |
|
bool | CanUndo () const |
|
bool | CanRedo () const |
|
ezStringView | GetUndoDisplayString () const |
|
ezStringView | GetRedoDisplayString () const |
|
void | StartTransaction (const ezFormatString &displayString) |
|
void | CancelTransaction () |
|
void | FinishTransaction () |
|
bool | IsInTransaction () const |
| Returns true, if between StartTransaction / EndTransaction. False during Undo/Redo.
|
|
bool | IsInUndoRedo () const |
|
void | BeginTemporaryCommands (ezStringView sDisplayString, bool bFireEventsWhenUndoingTempCommands=false) |
| Call this to start a series of transactions that typically change the same value over and over (e.g. dragging an object to a position). Every time a new transaction is started, the previous one is undone first. At the end of a series of temporary transactions, only the last transaction will be stored as a single undo step. Call this first and then start a transaction inside it.
|
|
void | CancelTemporaryCommands () |
|
void | FinishTemporaryCommands () |
|
bool | InTemporaryTransaction () const |
|
void | SuspendTemporaryTransaction () |
|
void | ResumeTemporaryTransaction () |
|
ezStatus | AddCommand (ezCommand &ref_command) |
|
void | ClearUndoHistory () |
|
void | ClearRedoHistory () |
|
void | MergeLastTwoTransactions () |
|
ezUInt32 | GetUndoStackSize () const |
|
ezUInt32 | GetRedoStackSize () const |
|
const ezCommandTransaction * | GetUndoStackEntry (ezUInt32 uiIndex) const |
|
const ezCommandTransaction * | GetRedoStackEntry (ezUInt32 uiIndex) const |
|
ezSharedPtr< ezCommandHistory::Storage > | SwapStorage (ezSharedPtr< ezCommandHistory::Storage > pNewStorage) |
|
ezSharedPtr< ezCommandHistory::Storage > | GetStorage () |
|
Stores the undo / redo stacks of transactions done on a document.
◆ MergeLastTwoTransactions()
void ezCommandHistory::MergeLastTwoTransactions |
( |
| ) |
|
- Todo:
- This would not be necessary, if hierarchical transactions would not crash
◆ StartTransaction()
void ezCommandHistory::StartTransaction |
( |
const ezFormatString & |
displayString | ) |
|
- Todo:
- Allow to have a limited transaction history and clean up transactions after a while
The documentation for this class was generated from the following files:
- /home/runner/work/ezEngine/ezEngine/Code/Tools/Libs/ToolsFoundation/CommandHistory/CommandHistory.h
- /home/runner/work/ezEngine/ezEngine/Code/Tools/Libs/ToolsFoundation/CommandHistory/Implementation/CommandHistory.cpp