Class
TextDocumentHistory

Represents a history in the text document.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.History

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

cs-api-definition
public class TextDocumentHistory

Inheritance: objectTextDocumentHistory

Constructors

TextDocumentHistory(TextDocument)

Initializes a new instance of the TextDocumentHistory class.

Declaration

cs-api-definition
public TextDocumentHistory(TextDocument document)

Parameters

document

TextDocument

Properties

CanRedo

Gets a value indicating whether the history can be redone.

Declaration

cs-api-definition
public bool CanRedo { get; }

Property Value

bool

CanUndo

Gets a value indicating whether the history can be undone.

Declaration

cs-api-definition
public bool CanUndo { get; }

Property Value

bool

Depth

Gets or sets the depth of the history.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly")]
public int Depth { get; set; }

Property Value

int

IsInUndoGroup

Gets a value indicating whether this instance is in undo group.

Declaration

cs-api-definition
public bool IsInUndoGroup { get; }

Property Value

bool

Methods

Clear()

Clears the undo/redo history stacks.

Declaration

cs-api-definition
public void Clear()

OnRecordExecuted(TextChangeHistoryAction, bool)

Called when record is executed.

Declaration

cs-api-definition
protected virtual void OnRecordExecuted(TextChangeHistoryAction historyAction, bool isMerged)

Parameters

historyAction

TextChangeHistoryAction

isMerged

bool

OnRecordExecuting()

Called when record is executing.

Declaration

cs-api-definition
protected virtual void OnRecordExecuting()

OnRedoExecuted(TextChangeHistoryAction)

Called when action is redone.

Declaration

cs-api-definition
protected virtual void OnRedoExecuted(TextChangeHistoryAction historyAction)

Parameters

historyAction

TextChangeHistoryAction

OnRedoExecuting(TextChangeHistoryAction)

Called when action is being redone.

Declaration

cs-api-definition
protected virtual void OnRedoExecuting(TextChangeHistoryAction historyAction)

Parameters

historyAction

TextChangeHistoryAction

OnUndoExecuted(TextChangeHistoryAction)

Called when action is undone.

Declaration

cs-api-definition
protected virtual void OnUndoExecuted(TextChangeHistoryAction historyAction)

Parameters

historyAction

TextChangeHistoryAction

OnUndoExecuting(TextChangeHistoryAction)

Called when action is being undone.

Declaration

cs-api-definition
protected virtual void OnUndoExecuting(TextChangeHistoryAction historyAction)

Parameters

historyAction

TextChangeHistoryAction

Redo()

Performs a redo operation.

Declaration

cs-api-definition
public bool Redo()

Returns

bool

Undo()

Performs an undo operation.

Declaration

cs-api-definition
public bool Undo()

Returns

bool