FormIt C++ API
v23.0.0 (2023.0.0)
|
Functions | |
FORMIT_CORE_EXPORT void | FormIt::UndoManagement::BeginState () |
Begin an undo state operation. More... | |
FORMIT_CORE_EXPORT size_t | FormIt::UndoManagement::EndState (1::string const &name, const 1::string &userName={}) |
End an undo state operation. More... | |
void FORMIT_CORE_EXPORT | FormIt::UndoManagement::RejectState () |
Reject the current undo state operation. More... | |
FORMIT_CORE_EXPORT StateID | FormIt::UndoManagement::GetCurrentState (HistoryID const &id) |
Get the ID of the current state in a given history. More... | |
FORMIT_CORE_EXPORT::vector< HistoryID > | FormIt::UndoManagement::GetHistoryIDs () |
Get the IDs of all histories being managed. More... | |
FORMIT_CORE_EXPORT::vector< StateID > | FormIt::UndoManagement::GetHistoryStates (HistoryID const &id) |
Get all the states in a given history. More... | |
FORMIT_CORE_EXPORT StateData | FormIt::UndoManagement::GetStateData (StateID const &id) |
Get the data for a given state. More... | |
FORMIT_CORE_EXPORT::vector< HistoryID > | FormIt::UndoManagement::GetStateHistories (StateID const &id) |
Get the histories affected by a given state. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::SetStateName (StateID const &id, 1::string const &str) |
Set the name for a given state. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::SetLastStateName (1::string const &str) |
Set the name for the most recent state. More... | |
FORMIT_CORE_EXPORT StateID | FormIt::UndoManagement::NoteState (1::string const &name, 1::vector< HistoryID > const &aHistories={}) |
Note a state that affects the given histories. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::MergeStates (1::vector< StateID > const &states) |
Merge multiple existing states into a single state. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::MergeStateRange (StateID idFirst, StateID idLast) |
Merge states in the half-open range [idFirst, idLast), where the states in the range are in reverse order of creation. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::MergeCurrentStates (1::vector< HistoryID > const &histories) |
Merge the current state of multiple existing histories into a single state. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::CanUndo (HistoryID const &id, size_t nStates=1) |
Can undo the given number of steps in the given history? More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::CanRedo (HistoryID const &id, size_t nStates=1) |
Can redo the given number of steps in the given history? More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::Undo (HistoryID const &id, size_t nStates=1, bool bAndDeleteRedo=false) |
Undo the given number of steps in the given history, optionally deleting the undone states afterwards. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::Redo (HistoryID const &id, size_t nStates=1) |
Redo the given number of steps in the given history. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::CanGlobalUndo () |
Can undo one step in any history? More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::CanGlobalRedo () |
Can redo one step in any history? More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::GlobalUndo (bool bAndDeleteRedo=false) |
Undo the most recent current state in any history and optionally delete redo information when undoing. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::GlobalRedo () |
Redo to the oldest current state in any history. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::RollTo (HistoryID const &nHistoryID, StateID const &nStateID, bool bAndDeleteRedo=false) |
Roll to a given state in the given history, optionally deleting the undone states afterwards when undoing. More... | |
FORMIT_CORE_EXPORT bool | FormIt::UndoManagement::IsInRollingMultipleHistories () |
Returns true during an undo or redo on multiple Histories. More... | |
const size_t | FormIt::UndoManagement::UNUSED_INDEX = size_t(-1) |
FORMIT_CORE_EXPORT void FormIt::UndoManagement::BeginState | ( | ) |
Begin an undo state operation.
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::CanGlobalRedo | ( | ) |
Can redo one step in any history?
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::CanGlobalUndo | ( | ) |
Can undo one step in any history?
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::CanRedo | ( | HistoryID const & | id, |
size_t | nStates = 1 |
||
) |
Can redo the given number of steps in the given history?
[in] | id | |
[in] | nStates |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::CanUndo | ( | HistoryID const & | id, |
size_t | nStates = 1 |
||
) |
Can undo the given number of steps in the given history?
[in] | id | |
[in] | nStates |
FORMIT_CORE_EXPORT size_t FormIt::UndoManagement::EndState | ( | 1::string const & | name, |
const 1::string & | userName = {} |
||
) |
End an undo state operation.
[in] | name | Name for the Object |
[in] | userName |
FORMIT_CORE_EXPORT StateID FormIt::UndoManagement::GetCurrentState | ( | HistoryID const & | id | ) |
Get the ID of the current state in a given history.
[in] | id |
FORMIT_CORE_EXPORT ::vector<HistoryID> FormIt::UndoManagement::GetHistoryIDs | ( | ) |
Get the IDs of all histories being managed.
FORMIT_CORE_EXPORT ::vector<StateID> FormIt::UndoManagement::GetHistoryStates | ( | HistoryID const & | id | ) |
Get all the states in a given history.
[in] | id |
FORMIT_CORE_EXPORT StateData FormIt::UndoManagement::GetStateData | ( | StateID const & | id | ) |
Get the data for a given state.
[in] | id |
FORMIT_CORE_EXPORT ::vector<HistoryID> FormIt::UndoManagement::GetStateHistories | ( | StateID const & | id | ) |
Get the histories affected by a given state.
[in] | id |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::GlobalRedo | ( | ) |
Redo to the oldest current state in any history.
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::GlobalUndo | ( | bool | bAndDeleteRedo = false | ) |
Undo the most recent current state in any history and optionally delete redo information when undoing.
[in] | bAndDeleteRedo | If true, the redo information is deleted. |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::IsInRollingMultipleHistories | ( | ) |
Returns true during an undo or redo on multiple Histories.
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::MergeCurrentStates | ( | 1::vector< HistoryID > const & | histories | ) |
Merge the current state of multiple existing histories into a single state.
[in] | histories |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::MergeStateRange | ( | StateID | idFirst, |
StateID | idLast | ||
) |
Merge states in the half-open range [idFirst, idLast), where the states in the range are in reverse order of creation.
This is to support an operation like this: StateID idLast = GetCurrentState(history); DoStuffHere(); MergeStates(GetCurrentState(history), idLast); Thus the states in the open range (idLast, idFirst) are merged into idFirst, and subsequently destroyed (the StateID will become invalid).
[in] | idFirst | |
[in] | idLast |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::MergeStates | ( | 1::vector< StateID > const & | states | ) |
Merge multiple existing states into a single state.
All but the last of the listed states will be destroyed (the StateID will become invalid). The range of states must be contiguous, in the order noted. No state being destroyed may be the current state for that history.
[in] | states |
FORMIT_CORE_EXPORT StateID FormIt::UndoManagement::NoteState | ( | 1::string const & | name, |
1::vector< HistoryID > const & | aHistories = {} |
||
) |
Note a state that affects the given histories.
If the histories vector is empty, it affects only the currently edited history.
[in] | name | Name for the Object |
[in] | aHistories |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::Redo | ( | HistoryID const & | id, |
size_t | nStates = 1 |
||
) |
Redo the given number of steps in the given history.
[in] | id | |
[in] | nStates |
void FORMIT_CORE_EXPORT FormIt::UndoManagement::RejectState | ( | ) |
Reject the current undo state operation.
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::RollTo | ( | HistoryID const & | nHistoryID, |
StateID const & | nStateID, | ||
bool | bAndDeleteRedo = false |
||
) |
Roll to a given state in the given history, optionally deleting the undone states afterwards when undoing.
[in] | nHistoryID | |
[in] | nStateID | |
[in] | bAndDeleteRedo | If true, the redo information is deleted. |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::SetLastStateName | ( | 1::string const & | str | ) |
Set the name for the most recent state.
[in] | str |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::SetStateName | ( | StateID const & | id, |
1::string const & | str | ||
) |
Set the name for a given state.
[in] | id | |
[in] | str |
FORMIT_CORE_EXPORT bool FormIt::UndoManagement::Undo | ( | HistoryID const & | id, |
size_t | nStates = 1 , |
||
bool | bAndDeleteRedo = false |
||
) |
Undo the given number of steps in the given history, optionally deleting the undone states afterwards.
[in] | id | |
[in] | nStates | |
[in] | bAndDeleteRedo | If true, the redo information is deleted. |
const size_t FormIt::UndoManagement::UNUSED_INDEX = size_t(-1) |
Used in index values below to indicate an unused value.