FormIt C++ API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
FormIt::UndoManagement Namespace Reference

Classes

struct  HistoryID
 Simple wrappers to ensure type safety. More...
 
class  JSHistoryID
 JSHistoryID is a helper class for JS APIs to take either a HistoryID or int. More...
 
class  JSStateID
 JSStateID is a helper class for JS APIs to take either a StateID or int. More...
 
struct  StateData
 The observable data of an undo state. More...
 
struct  StateID
 FormIt::UndoManagement::StateID struct. More...
 
class  StateManager
 This class is used to merge into a single state all the WSM deltas created across all histories while the manager object is alive.<! More...
 
class  Suspend
 This suspends all update messages from WSM until either the object is destroyed, or resume is called. More...
 

Functions

FORMIT_CORE_EXPORT void BeginState ()
 Begin an undo state operation.
 
FORMIT_CORE_EXPORT size_t EndState (1::string const &name, const 1::string &userName={})
 End an undo state operation.
 
void FORMIT_CORE_EXPORT RejectState ()
 Reject the current undo state operation.
 
FORMIT_CORE_EXPORT StateID GetCurrentState (HistoryID const &id)
 Get the ID of the current state in a given history.
 
FORMIT_CORE_EXPORT ::vector< HistoryIDGetHistoryIDs ()
 Get the IDs of all histories being managed.
 
FORMIT_CORE_EXPORT ::vector< StateIDGetHistoryStates (HistoryID const &id)
 Get all the states in a given history.
 
FORMIT_CORE_EXPORT StateData GetStateData (StateID const &id)
 Get the data for a given state.
 
FORMIT_CORE_EXPORT ::vector< HistoryIDGetStateHistories (StateID const &id)
 Get the histories affected by a given state.
 
FORMIT_CORE_EXPORT bool SetStateName (StateID const &id, 1::string const &str)
 Set the name for a given state.
 
FORMIT_CORE_EXPORT bool SetLastStateName (1::string const &str)
 Set the name for the most recent state.
 
FORMIT_CORE_EXPORT StateID NoteState (1::string const &name, 1::vector< HistoryID > const &aHistories={})
 Note a state that affects the given histories.
 
FORMIT_CORE_EXPORT bool MergeStates (1::vector< StateID > const &states)
 Merge multiple existing states into a single state.
 
FORMIT_CORE_EXPORT bool 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.
 
FORMIT_CORE_EXPORT bool MergeCurrentStates (1::vector< HistoryID > const &histories)
 Merge the current state of multiple existing histories into a single state.
 
FORMIT_CORE_EXPORT bool CanUndo (HistoryID const &id, size_t nStates=1)
 Can undo the given number of steps in the given history?
 
FORMIT_CORE_EXPORT bool CanRedo (HistoryID const &id, size_t nStates=1)
 Can redo the given number of steps in the given history?
 
FORMIT_CORE_EXPORT bool 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.
 
FORMIT_CORE_EXPORT bool Redo (HistoryID const &id, size_t nStates=1)
 Redo the given number of steps in the given history.
 
FORMIT_CORE_EXPORT bool CanGlobalUndo ()
 Can undo one step in any history?
 
FORMIT_CORE_EXPORT bool CanGlobalRedo ()
 Can redo one step in any history?
 
FORMIT_CORE_EXPORT bool GlobalUndo (bool bAndDeleteRedo=false)
 Undo the most recent current state in any history and optionally delete redo information when undoing.
 
FORMIT_CORE_EXPORT bool GlobalRedo ()
 Redo to the oldest current state in any history.
 
FORMIT_CORE_EXPORT bool 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.
 
FORMIT_CORE_EXPORT void FixStateNamesAndUsersOnJoin ()
 Fixes state names and user names when initially joining collaboration.
 

Variables

const size_t UNUSED_INDEX = size_t(-1)