#include <HistoryManager.h>
A HistoryManager allows managing changesets for undo/redo. It is associated with an offscreen editor.
- Since
- 3.0
◆ ~HistoryManager()
| virtual myscript::iink::HistoryManager::~HistoryManager |
( |
| ) |
|
|
virtualdefault |
◆ undo()
| virtual void myscript::iink::HistoryManager::undo |
( |
| ) |
|
|
pure virtual |
Undo the last changeset on part.
- Note
- this function will wait for pending gestures recognition.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when undo operations failed. |
◆ redo()
| virtual void myscript::iink::HistoryManager::redo |
( |
| ) |
|
|
pure virtual |
Redo the last changeset reverted by undo on part.
- Note
- this function will wait for pending gestures recognition.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when redo operations failed. |
◆ getUndoRedoStackIndex()
| virtual int myscript::iink::HistoryManager::getUndoRedoStackIndex |
( |
| ) |
|
|
pure virtual |
Returns the number of changesets performed on the part, since content part was opened.
- Note
- this function will wait for pending gestures recognition.
-
the undo stack is partially purged from time to time to control memory consumption. The number of possible undo changesets at a given time is provided by
getPossibleUndoCount(), while the total number of changesets since content part was opened is provided by getUndoStackIndex().
- Returns
- the number of changesets performed on the part.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
◆ getPossibleUndoCount()
| virtual int myscript::iink::HistoryManager::getPossibleUndoCount |
( |
| ) |
|
|
pure virtual |
Returns the number of changesets that can be undone (<= getUndoStackIndex()).
- Note
- this function will wait for pending gestures recognition.
- Returns
- the number of changesets that can be undone.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
◆ getPossibleRedoCount()
| virtual int myscript::iink::HistoryManager::getPossibleRedoCount |
( |
| ) |
|
|
pure virtual |
Returns the number of changesets that can be redone.
- Note
- this function will wait for pending gestures recognition.
- Returns
- the number of changesets that can be redone.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
◆ getUndoRedoIdAt()
| virtual String myscript::iink::HistoryManager::getUndoRedoIdAt |
( |
int |
stackIndex | ) |
|
|
pure virtual |
Returns the id associated with an undo/redo stack index. Valid stack index values range from (current stack index - possible undo count) to (current stack index + possible redo count - 1).
- Note
- this function will wait for pending gestures recognition.
- Parameters
-
| stackIndex | the index in the undo/redo stack. |
- Returns
- the id associated with the undo/redo stack index.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
| std::runtime_error | when stackIndex is invalid. |
◆ getUndoChangesetTo()
Returns the changeset corresponding to an undo to the given id.
- Parameters
-
| id | the id in the undo/redo stack. |
- Returns
- the changeset if it exists, otherwise empty.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
◆ getRedoChangesetFrom()
Returns the changeset corresponding to a redo from the given id.
- Parameters
-
| id | the id in the undo/redo stack. |
- Returns
- the changeset if it exists, otherwise empty.
- Exceptions
-
| std::runtime_error | when associated editor has been destroyed. |
| std::runtime_error | when editor is not associated with a part. |
The documentation for this class was generated from the following file: