Table of Contents

Class UndoTab<T>

Namespace
AlphaFramework.Editor
Assembly
AlphaFramework.Editor.dll

A base class for all editor windows that have undo-functionality

public abstract class UndoTab<T> : Tab, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl

Type Parameters

T

Data type for storing undo checkpoint information (e.g. cloned snapshots or command logs)

Inheritance
UndoTab<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

UndoTab()

Initializes a new instance of the UserControl class.

protected UndoTab()

Fields

RedoBackups

Entries used by the undo-system to redo changes previously undone

protected readonly Stack<T> RedoBackups

Field Value

Stack<T>

UndoBackups

Entries used by the undo-system to undo changes

protected readonly Stack<T> UndoBackups

Field Value

Stack<T>

buttonRedo

The redo button.

protected readonly Button buttonRedo

Field Value

Button

buttonUndo

The undo button.

protected readonly Button buttonUndo

Field Value

Button

Methods

OnChange()

Mark the content of this tab as changed (needs to be saved)

protected override void OnChange()

OnRedo()

Hook to redo the last undone change

protected abstract void OnRedo()

OnSaveFile()

Called when the content of this tab is to be saved to a file.

protected override void OnSaveFile()

Exceptions

ArgumentException

The file path is invalid.

NotSupportedException

The file path is invalid.

IOException

There was a problem writing a file.

UnauthorizedAccessException

Write access to a file was denied.

OnUndo()

Hook to undo the last change

protected abstract void OnUndo()

Redo()

Hook to redo the last undone change

public override void Redo()

Undo()

Hook to undo the last change

public override void Undo()