FormIt Plugin API  v23.0.0 (2023.0.0)
FormIt.UndoManagement API

Description

Functions

json FormIt.UndoManagement.BeginState ()
 
json FormIt.UndoManagement.EndState (name, userName)
 Ends a state change operation. More...
 
json FormIt.UndoManagement.RejectState ()
 Reject the current undo state operation. More...
 
json FormIt.UndoManagement.CanGlobalRedo ()
 Can redo one step in any history. More...
 
json FormIt.UndoManagement.GlobalRedo ()
 Redo to the oldest current state in any history. More...
 
json FormIt.UndoManagement.GlobalUndo (bAndDeleteRedo)
 Undo the most recent current state in any history and optionally delete redo information when undoing. More...
 
json FormIt.UndoManagement.CanGlobalUndo ()
 Can undo one step in any history. More...
 
json FormIt.UndoManagement.CanRedo (nHistoryID, nStates)
 
json FormIt.UndoManagement.CanUndo (nHistoryID, nStates)
 
json FormIt.UndoManagement.GetCurrentState (nHistoryID)
 
json FormIt.UndoManagement.GetHistoryIDs ()
 Get the IDs of all Historys being managed. More...
 
json FormIt.UndoManagement.GetHistoryStates (nHistoryID)
 
json FormIt.UndoManagement.GetStateData (nStateID)
 
json FormIt.UndoManagement.GetStateHistories (nStateID)
 
json FormIt.UndoManagement.MergeCurrentStates (histories)
 Merge the current state of multiple existing histories into a single state. More...
 
json FormIt.UndoManagement.MergeStateRange (idFirst, idLast)
 
json FormIt.UndoManagement.MergeStates (states)
 Merge multiple existing states into a single state. More...
 
json FormIt.UndoManagement.NoteState (name, aHistories)
 Note a state that affects the given histories. More...
 
json FormIt.UndoManagement.Redo (nHistoryID, nStates)
 
json FormIt.UndoManagement.RollTo (nHistoryID, nStateID, bAndDeleteRedo)
 
json FormIt.UndoManagement.SetLastStateName (stateName)
 Set the name for the most recent state. More...
 
json FormIt.UndoManagement.SetStateName (nStateID, stateName)
 
json FormIt.UndoManagement.Undo (nHistoryID, nStates, bAndDeleteRedo)
 

Function Documentation

json FormIt.UndoManagement.BeginState ( )
json FormIt.UndoManagement.CanGlobalRedo ( )

Can redo one step in any history.

Returns
bool
json FormIt.UndoManagement.CanGlobalUndo ( )

Can undo one step in any history.

Returns
bool
json FormIt.UndoManagement.CanRedo ( nHistoryID  ,
nStates   
)
json FormIt.UndoManagement.CanUndo ( nHistoryID  ,
nStates   
)
json FormIt.UndoManagement.EndState ( name  ,
userName   
)

Ends a state change operation.

Parameters
[in]nameA name describing the operation
[in]userNameUsername of the owner of the undo state
Returns
state ID
json FormIt.UndoManagement.GetCurrentState ( nHistoryID  )
json FormIt.UndoManagement.GetHistoryIDs ( )

Get the IDs of all Historys being managed.

Returns
Array of History ids.
json FormIt.UndoManagement.GetHistoryStates ( nHistoryID  )
json FormIt.UndoManagement.GetStateData ( nStateID  )
json FormIt.UndoManagement.GetStateHistories ( nStateID  )
json FormIt.UndoManagement.GlobalRedo ( )

Redo to the oldest current state in any history.

Returns
bool Success
json FormIt.UndoManagement.GlobalUndo ( bAndDeleteRedo  )

Undo the most recent current state in any history and optionally delete redo information when undoing.

Parameters
[in]bAndDeleteRedobool (OPTIONAL)
Returns
bool Success
json FormIt.UndoManagement.MergeCurrentStates ( histories  )

Merge the current state of multiple existing histories into a single state.

Parameters
[in]historiesArray of History ids
Returns
bool Success
json FormIt.UndoManagement.MergeStateRange ( idFirst  ,
idLast   
)
json FormIt.UndoManagement.MergeStates ( 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.

Parameters
[in]statesArray of state ids
Returns
bool Success
json FormIt.UndoManagement.NoteState ( name  ,
aHistories   
)

Note a state that affects the given histories.

If the histories vector is empty, it affects only the currently edited history.

Parameters
[in]nameString
[in]aHistoriesArray of History ids (OPTIONAL)
Returns
State id
json FormIt.UndoManagement.Redo ( nHistoryID  ,
nStates   
)
json FormIt.UndoManagement.RejectState ( )

Reject the current undo state operation.

Returns
JSON_UNDEFINED
json FormIt.UndoManagement.RollTo ( nHistoryID  ,
nStateID  ,
bAndDeleteRedo   
)
json FormIt.UndoManagement.SetLastStateName ( stateName  )

Set the name for the most recent state.

Parameters
[in]stateNameString
Returns
bool Success
json FormIt.UndoManagement.SetStateName ( nStateID  ,
stateName   
)
json FormIt.UndoManagement.Undo ( nHistoryID  ,
nStates  ,
bAndDeleteRedo   
)