Skip to content

XUICEUndoableReplaceLineContents

Implements XUIUndoableAction

Description

Stores the data required to undo / redo the replacement of a line of text within the XUICodeEditor.

Properties

Name Type Read-Only
mCaretPos Integer
mDescription String
mEditor XUICodeEditor
mID Integer
mLineNumber Integer
mNewContents String
mOriginalContents String

Methods

Name Parameters Returns
Constructor editor As XUICodeEditor, id As Integer, description As String, lineNumber As Integer, originalContents As String, newContents As String, caretPos As Integer
Description String
ID Integer
ID Assigns value As Integer
Redo
Undo

Property Descriptions

mCaretPos As Integer

The caret position where the replacement occurred.


mDescription As String

A description of this action.


mEditor As XUICodeEditor

The editor where the line contents replacement occurred.


mID As Integer

Internal cache of this action's ID.


mLineNumber As Integer

The 1-based number of the line that was modified.


mNewContents As String

The new contents of the line.


mOriginalContents As String

The original contents of the line.


Method Descriptions

Constructor(editor As XUICodeEditor, id As Integer, description As String, lineNumber As Integer, originalContents As String, newContents As String, caretPos As Integer)

Default constructor.

  • editor is the XUICodeEditor to perform this action on.
  • id is the unique ID for this action.
  • description is a human-radable description of this action for displaying in menubars and contextual menus.
  • lineNumber is the 1-based number of the line that was modified.
  • originalContents is the original contents of the line.
  • newContents is the new contents of the line.

Description() As String

A description of this undoable action.

Part of the XUIUndoableAction interface.


ID() As Integer

This action's unique ID.

Part of the XUIUndoableAction interface.


ID(Assigns value As Integer)

This action's unique ID.

Part of the XUIUndoableAction interface.


Redo()

Redo the replacement of the contents of the specified line.

Assumes that there are no new lines in mNewContents. Part of the XUIUndoableAction interface.


Undo()

Undo the replacement of the contents of this line.

Assumes that there are no new lines in mOriginalContents. Part of the XUIUndoableAction interface.