Tanoda
GILES.Undo Class Reference
Inheritance diagram for GILES.Undo:
GILES.pb_ScriptableObjectSingleton< Undo >

Classes

class  UndoState
 

Static Public Member Functions

static void AddUndoPerformedListener (Callback callback)
 
static void AddRedoPerformedListener (Callback callback)
 
static string PrintUndoStack ()
 
static string PrintRedoStack ()
 
static string GetCurrentUndo ()
 
static string GetCurrentRedo ()
 
static void RegisterState (IUndo target, string message)
 
static void RegisterStates (IEnumerable< IUndo > targets, string message)
 
static void PerformUndo ()
 
static void PerformRedo ()
 

Public Attributes

Callback undoPerformed = null
 
Callback redoPerformed = null
 
Callback undoStackModified = null
 
Callback redoStackModified = null
 

Additional Inherited Members

- Protected Member Functions inherited from GILES.pb_ScriptableObjectSingleton< Undo >
virtual void OnEnable ()
 
- Properties inherited from GILES.pb_ScriptableObjectSingleton< Undo >
static T instance [get]
 
static T nullableInstance [get]
 

Detailed Description

The Undo class is responsible for managing the undo state and stack. It is implemented as a singleton with a static interface. Register IUndo inheriting actions with Undo.RegisterState or Undo.RegisterStates, and use Undo.PerformUndo and Undo.PerformRedo to step through the stack.

See also
IUndo, UndoDelete, UndoInstantiate, UndoTransform

Definition at line 14 of file Undo.cs.

Member Function Documentation

◆ AddRedoPerformedListener()

static void GILES.Undo.AddRedoPerformedListener ( Callback  callback)
static

Add a callback when an Redo action is performed.

Definition at line 77 of file Undo.cs.

◆ AddUndoPerformedListener()

static void GILES.Undo.AddUndoPerformedListener ( Callback  callback)
static

Add a callback when an Undo action is performed.

Definition at line 66 of file Undo.cs.

◆ GetCurrentRedo()

static string GILES.Undo.GetCurrentRedo ( )
static

Get the message accompanying the next queued redo action.

Definition at line 204 of file Undo.cs.

◆ GetCurrentUndo()

static string GILES.Undo.GetCurrentUndo ( )
static

Get the message from the last registered IUndo, or if PerformRedo was called more recently, this will be the currently queued undo action.

Definition at line 196 of file Undo.cs.

◆ PerformRedo()

static void GILES.Undo.PerformRedo ( )
static

If the Redo stack exists, this applies the queued Redo action. Redo is cleared on Undo.RegisterState or Undo.RegisterStates calls.

Definition at line 259 of file Undo.cs.

◆ PerformUndo()

static void GILES.Undo.PerformUndo ( )
static

Applies the currently queued Undo state.

Definition at line 237 of file Undo.cs.

◆ PrintRedoStack()

static string GILES.Undo.PrintRedoStack ( )
static

Return a formatted string with a summary of every redo-able action in the redo stack.

Definition at line 99 of file Undo.cs.

◆ PrintUndoStack()

static string GILES.Undo.PrintUndoStack ( )
static

Return a formatted string with a summary of every undo-able action in the undo stack.

Definition at line 91 of file Undo.cs.

◆ RegisterState()

static void GILES.Undo.RegisterState ( IUndo  target,
string  message 
)
static

Register a new undoable state with message. Message should describe the action that will be undone.

See also
IUndo

Definition at line 214 of file Undo.cs.

◆ RegisterStates()

static void GILES.Undo.RegisterStates ( IEnumerable< IUndo targets,
string  message 
)
static

Register a collection of undoable states with message. Message should describe the action that will be undone.

See also
IUndo

Definition at line 226 of file Undo.cs.

Member Data Documentation

◆ redoPerformed

Callback GILES.Undo.redoPerformed = null

Definition at line 59 of file Undo.cs.

◆ redoStackModified

Callback GILES.Undo.redoStackModified = null

Definition at line 61 of file Undo.cs.

◆ undoPerformed

Callback GILES.Undo.undoPerformed = null

Definition at line 58 of file Undo.cs.

◆ undoStackModified

Callback GILES.Undo.undoStackModified = null

Definition at line 60 of file Undo.cs.


The documentation for this class was generated from the following file: