ClassCaretPosition
Represents a CaretPosition information.
Definition
Namespace:Telerik.Windows.Controls.SyntaxEditor.UI
Assembly:Telerik.Windows.Controls.SyntaxEditor.dll
Syntax:
public class CaretPosition : IComparable<CaretPosition>, IEquatable<CaretPosition>, IDisposable
Inheritance: objectCaretPosition
Implements:
Constructors
CaretPosition(CaretPosition)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(CaretPosition position)
Parameters
position
The position.
CaretPosition(CaretPosition, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(CaretPosition position, PositionAnchoringType anchoringType)
Parameters
position
The position.
anchoringType
Type of the anchoring.
CaretPosition(TextDocument)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document)
Parameters
document
The document.
CaretPosition(TextDocument, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, PositionAnchoringType anchoringType)
Parameters
document
The document.
anchoringType
Type of the anchoring.
CaretPosition(TextDocument, int, int)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber)
Parameters
document
The document.
lineNumber
The line number.
columnNumber
The column number.
CaretPosition(TextDocument, int, int, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber, PositionAnchoringType anchoringType)
Parameters
document
The document.
lineNumber
The line number.
columnNumber
The column number.
anchoringType
Type of the anchoring.
Properties
AnchoringType
Gets the type of the anchoring.
Declaration
public PositionAnchoringType AnchoringType { get; }
Property Value
The type of the anchoring.
ColumnNumber
Gets the column number.
Declaration
public int ColumnNumber { get; }
Property Value
The column number.
DisplayColumnNumber
Gets the display column number.
Declaration
public int DisplayColumnNumber { get; }
Property Value
The display column number.
DisplayLineNumber
Gets the display line number.
Declaration
public int DisplayLineNumber { get; }
Property Value
The display line number.
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
The document.
Index
Gets the index.
IsAnchored
Gets a value indicating whether this instance is anchored.
LastTrackedColumn
Gets or sets the last tracked column. NOTE: Used for up/down in non-wrapped scenarios.
Declaration
public int LastTrackedColumn { get; set; }
Property Value
The last tracked column.
LineNumber
Gets the line number.
Methods
CompareTo(CaretPosition)
Compares the current object with another object of the same type.
Declaration
public int CompareTo(CaretPosition other)
Parameters
other
An object to compare with this object.
Returns
A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.
Implements
ConvertFromIndex(TextDocument, int)
Converts from index.
Declaration
public static CaretPosition ConvertFromIndex(TextDocument document, int index)
Parameters
document
The document.
index
The index.
Returns
CaretPosition.
ConvertToIndex(CaretPosition)
Converts to index.
Declaration
public static int ConvertToIndex(CaretPosition position)
Parameters
position
The position.
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Equals(CaretPosition)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CaretPosition other)
Parameters
other
An object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.
Implements
Equals(object)
Determines whether the specified object is equal to this instance.
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
IsAtWordStart()
Determines whether [is at word start].
Declaration
public bool IsAtWordStart()
Returns
true if [is at word start]; otherwise, false.
MoveLineDown()
Moves the line down.
Declaration
public bool MoveLineDown()
Returns
true if XXXX, false otherwise.
MoveLineUp()
Moves the line up.
MoveToCurrentWordEnd()
Moves to current word end.
Declaration
public bool MoveToCurrentWordEnd()
Returns
true if XXXX, false otherwise.
MoveToCurrentWordStart()
Moves to current word start.
Declaration
public bool MoveToCurrentWordStart()
Returns
true if XXXX, false otherwise.
MoveToEndOfDocument()
Moves to end of document.
Declaration
public void MoveToEndOfDocument()
MoveToIndex(int)
Moves to index.
MoveToLine(int)
Moves to line.
MoveToNextCharacter()
Moves to next character.
Declaration
public bool MoveToNextCharacter()
Returns
true if XXXX, false otherwise.
MoveToNextWord()
Moves to next word.
Declaration
public bool MoveToNextWord()
Returns
true if XXXX, false otherwise.
MoveToPosition(CaretPosition)
Moves to position.
Declaration
public bool MoveToPosition(CaretPosition position)
Parameters
position
Returns
MoveToPreviousCharacter()
Moves to previous character.
Declaration
public bool MoveToPreviousCharacter()
Returns
true if XXXX, false otherwise.
MoveToPreviousWord()
Moves to previous word.
Declaration
public bool MoveToPreviousWord()
Returns
true if XXXX, false otherwise.
MoveToStartOfDocument()
Moves to start of document.
Declaration
public void MoveToStartOfDocument()
OnPositionChanged()
Called when [position changed].
Declaration
protected virtual void OnPositionChanged()
OnPositionChanging()
Called when [position changing].
Declaration
protected virtual void OnPositionChanging()
ToString()
Returns a string that represents this instance.
Events
PositionChanged
PositionChanged event.
PositionChanging
PositionChanging event.
Operators
operator !=(CaretPosition, CaretPosition)
Implements the != operator.
Declaration
public static bool operator !=(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.
operator <(CaretPosition, CaretPosition)
Implements the < operator.
Declaration
public static bool operator <(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.
operator <=(CaretPosition, CaretPosition)
Implements the <= operator.
Declaration
public static bool operator <=(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.
operator ==(CaretPosition, CaretPosition)
Implements the == operator.
Declaration
public static bool operator ==(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.
operator >(CaretPosition, CaretPosition)
Implements the > operator.
Declaration
public static bool operator >(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.
operator >=(CaretPosition, CaretPosition)
Implements the >= operator.
Declaration
public static bool operator >=(CaretPosition left, CaretPosition right)
Parameters
left
The left.
right
The right.
Returns
The result of the operator.