Class CaretPosition
Represents a CaretPosition information.
Inheritance
Inherited Members
Namespace: Telerik.WinForms.Controls.SyntaxEditor.UI
Assembly: Telerik.WinControls.SyntaxEditor.dll
Syntax
public class CaretPosition : IComparable<CaretPosition>, IEquatable<CaretPosition>, IDisposable
Constructors
CaretPosition(CaretPosition)
Initializes a new instance of the Caret
Declaration
public CaretPosition(CaretPosition position)
Parameters
Caret The position. |
CaretPosition(CaretPosition, PositionAnchoringType)
Initializes a new instance of the Caret
Declaration
public CaretPosition(CaretPosition position, PositionAnchoringType anchoringType)
Parameters
Caret The position. |
Position Type of the anchoring. |
CaretPosition(TextDocument)
Initializes a new instance of the Caret
Declaration
public CaretPosition(TextDocument document)
Parameters
Text The document. |
CaretPosition(TextDocument, Int32, Int32)
Initializes a new instance of the Caret
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber)
Parameters
Text The document. |
System. The line number. |
System. The column number. |
CaretPosition(TextDocument, Int32, Int32, PositionAnchoringType)
Initializes a new instance of the Caret
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber, PositionAnchoringType anchoringType)
Parameters
Text The document. |
System. The line number. |
System. The column number. |
Position Type of the anchoring. |
CaretPosition(TextDocument, PositionAnchoringType)
Initializes a new instance of the Caret
Declaration
public CaretPosition(TextDocument document, PositionAnchoringType anchoringType)
Parameters
Text The document. |
Position Type of the anchoring. |
Properties
AnchoringType
Gets the type of the anchoring.
Declaration
public PositionAnchoringType AnchoringType { get; }
Property Value
Position The type of the anchoring. |
ColumnNumber
Gets the column number.
Declaration
public int ColumnNumber { get; }
Property Value
System. The column number. |
DisplayColumnNumber
Gets the display column number.
Declaration
public int DisplayColumnNumber { get; }
Property Value
System. The display column number. |
DisplayLineNumber
Gets the display line number.
Declaration
public int DisplayLineNumber { get; }
Property Value
System. The display line number. |
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
Text The document. |
Index
Gets the index.
Declaration
public int Index { get; }
Property Value
System. The index. |
IsAnchored
Gets a value indicating whether this instance is anchored.
Declaration
public bool IsAnchored { get; }
Property Value
System.
|
LastTrackedColumn
Gets or sets the last tracked column. NOTE: Used for up/down.
Declaration
public int LastTrackedColumn { get; set; }
Property Value
System. The last tracked column. |
LineNumber
Gets the line number.
Declaration
public int LineNumber { get; }
Property Value
System. The line number. |
TabSize
Gets or sets the size of the tab.
Declaration
public int TabSize { get; set; }
Property Value
System. The size of the tab. |
Methods
CompareTo(CaretPosition)
Compares the current object with another object of the same type.
Declaration
public int CompareTo(CaretPosition other)
Parameters
Caret An object to compare with this object. |
Returns
System. 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 |
Implements
ConvertFromIndex(TextDocument, Int32)
Converts from index.
Declaration
public static CaretPosition ConvertFromIndex(TextDocument document, int index)
Parameters
Text The document. |
System. The index. |
Returns
Caret CaretPosition. |
ConvertToIndex(CaretPosition)
Converts to index.
Declaration
public static int ConvertToIndex(CaretPosition position)
Parameters
Caret The position. |
Returns
System.
|
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.
|
Equals(Object)
Determines whether the specified System.
Declaration
public override bool Equals(object obj)
Parameters
System. The object to compare with the current object. |
Returns
System.
|
Overrides
Equals(CaretPosition)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CaretPosition other)
Parameters
Caret An object to compare with this object. |
Returns
System. true if the current object is equal to the |
Implements
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System. 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
System.
|
MoveLineDown()
Moves the line down.
Declaration
public bool MoveLineDown()
Returns
System.
|
MoveLineUp()
Moves the line up.
Declaration
public bool MoveLineUp()
Returns
System.
|
MoveToCurrentWordEnd()
Moves to current word end.
Declaration
public bool MoveToCurrentWordEnd()
Returns
System.
|
MoveToCurrentWordStart()
Moves to current word start.
Declaration
public bool MoveToCurrentWordStart()
Returns
System.
|
MoveToEndOfDocument()
Moves to end of document.
Declaration
public void MoveToEndOfDocument()
MoveToHome()
Moves to home.
Declaration
public void MoveToHome()
MoveToIndex(Int32)
Moves to index.
Declaration
public bool MoveToIndex(int indexParameter)
Parameters
System. The index. |
Returns
System.
|
MoveToLine(Int32)
Moves to line.
Declaration
public void MoveToLine(int lineNumber)
Parameters
System.
|
MoveToLineEnd()
Moves to line end.
Declaration
public void MoveToLineEnd()
MoveToLineStart()
Moves to line start.
Declaration
public void MoveToLineStart()
MoveToNextCharacter()
Moves to next character.
Declaration
public bool MoveToNextCharacter()
Returns
System.
|
MoveToNextWord()
Moves to next word.
Declaration
public bool MoveToNextWord()
Returns
System.
|
MoveToPosition(CaretPosition)
Moves to position.
Declaration
public bool MoveToPosition(CaretPosition position)
Parameters
Caret
|
Returns
System.
|
MoveToPreviousCharacter()
Moves to previous character.
Declaration
public bool MoveToPreviousCharacter()
Returns
System.
|
MoveToPreviousWord()
Moves to previous word.
Declaration
public bool MoveToPreviousWord()
Returns
System.
|
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 System.
Declaration
public override string ToString()
Returns
System. A System. |
Overrides
Events
PositionChanged
PositionChanged event.
Declaration
public event EventHandler PositionChanged
Event Type
System.
|
PositionChanging
PositionChanging event.
Declaration
public event EventHandler PositionChanging
Event Type
System.
|
Operators
Equality(CaretPosition, CaretPosition)
Implements the == operator.
Declaration
public static bool operator ==(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |
GreaterThan(CaretPosition, CaretPosition)
Implements the > operator.
Declaration
public static bool operator>(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |
GreaterThanOrEqual(CaretPosition, CaretPosition)
Implements the >= operator.
Declaration
public static bool operator >=(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |
Inequality(CaretPosition, CaretPosition)
Implements the != operator.
Declaration
public static bool operator !=(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |
LessThan(CaretPosition, CaretPosition)
Implements the < operator.
Declaration
public static bool operator <(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |
LessThanOrEqual(CaretPosition, CaretPosition)
Implements the <= operator.
Declaration
public static bool operator <=(CaretPosition left, CaretPosition right)
Parameters
Caret The left. |
Caret The right. |
Returns
System. The result of the operator. |