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 CaretPosition class.
Declaration
public CaretPosition(CaretPosition position)
Parameters
CaretPosition
position
The position. |
CaretPosition(CaretPosition, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(CaretPosition position, PositionAnchoringType anchoringType)
Parameters
CaretPosition
position
The position. |
PositionAnchoringType
anchoringType
Type of the anchoring. |
CaretPosition(TextDocument)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document)
Parameters
TextDocument
document
The document. |
CaretPosition(TextDocument, Int32, Int32)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber)
Parameters
TextDocument
document
The document. |
System.Int32
lineNumber
The line number. |
System.Int32
columnNumber
The column number. |
CaretPosition(TextDocument, Int32, Int32, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber, PositionAnchoringType anchoringType)
Parameters
TextDocument
document
The document. |
System.Int32
lineNumber
The line number. |
System.Int32
columnNumber
The column number. |
PositionAnchoringType
anchoringType
Type of the anchoring. |
CaretPosition(TextDocument, PositionAnchoringType)
Initializes a new instance of the CaretPosition class.
Declaration
public CaretPosition(TextDocument document, PositionAnchoringType anchoringType)
Parameters
TextDocument
document
The document. |
PositionAnchoringType
anchoringType
Type of the anchoring. |
Properties
AnchoringType
Gets the type of the anchoring.
Declaration
public PositionAnchoringType AnchoringType { get; }
Property Value
PositionAnchoringType
The type of the anchoring. |
ColumnNumber
Gets the column number.
Declaration
public int ColumnNumber { get; }
Property Value
System.Int32
The column number. |
DisplayColumnNumber
Gets the display column number.
Declaration
public int DisplayColumnNumber { get; }
Property Value
System.Int32
The display column number. |
DisplayLineNumber
Gets the display line number.
Declaration
public int DisplayLineNumber { get; }
Property Value
System.Int32
The display line number. |
Document
Gets the document.
Declaration
public TextDocument Document { get; }
Property Value
TextDocument
The document. |
Index
Gets the index.
Declaration
public int Index { get; }
Property Value
System.Int32
The index. |
IsAnchored
Gets a value indicating whether this instance is anchored.
Declaration
public bool IsAnchored { get; }
Property Value
System.Boolean
|
LastTrackedColumn
Gets or sets the last tracked column. NOTE: Used for up/down.
Declaration
public int LastTrackedColumn { get; set; }
Property Value
System.Int32
The last tracked column. |
LineNumber
Gets the line number.
Declaration
public int LineNumber { get; }
Property Value
System.Int32
The line number. |
TabSize
Gets or sets the size of the tab.
Declaration
public int TabSize { get; set; }
Property Value
System.Int32
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
CaretPosition
other
An object to compare with this object. |
Returns
System.Int32
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
TextDocument
document
The document. |
System.Int32
index
The index. |
Returns
CaretPosition
CaretPosition. |
ConvertToIndex(CaretPosition)
Converts to index.
Declaration
public static int ConvertToIndex(CaretPosition position)
Parameters
CaretPosition
position
The position. |
Returns
System.Int32
|
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.Boolean
disposing
|
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The object to compare with the current object. |
Returns
System.Boolean
|
Overrides
Equals(CaretPosition)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CaretPosition other)
Parameters
CaretPosition
other
An object to compare with this object. |
Returns
System.Boolean
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.Int32
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.Boolean
|
MoveLineDown()
Moves the line down.
Declaration
public bool MoveLineDown()
Returns
System.Boolean
|
MoveLineUp()
Moves the line up.
Declaration
public bool MoveLineUp()
Returns
System.Boolean
|
MoveToCurrentWordEnd()
Moves to current word end.
Declaration
public bool MoveToCurrentWordEnd()
Returns
System.Boolean
|
MoveToCurrentWordStart()
Moves to current word start.
Declaration
public bool MoveToCurrentWordStart()
Returns
System.Boolean
|
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.Int32
indexParameter
The index. |
Returns
System.Boolean
|
MoveToLine(Int32)
Moves to line.
Declaration
public void MoveToLine(int lineNumber)
Parameters
System.Int32
lineNumber
|
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.Boolean
|
MoveToNextWord()
Moves to next word.
Declaration
public bool MoveToNextWord()
Returns
System.Boolean
|
MoveToPosition(CaretPosition)
Moves to position.
Declaration
public bool MoveToPosition(CaretPosition position)
Parameters
CaretPosition
position
|
Returns
System.Boolean
|
MoveToPreviousCharacter()
Moves to previous character.
Declaration
public bool MoveToPreviousCharacter()
Returns
System.Boolean
|
MoveToPreviousWord()
Moves to previous word.
Declaration
public bool MoveToPreviousWord()
Returns
System.Boolean
|
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.String that represents this instance.
Declaration
public override string ToString()
Returns
System.String
A System.String that represents this instance. |
Overrides
Events
PositionChanged
PositionChanged event.
Declaration
public event EventHandler PositionChanged
Event Type
System.EventHandler
|
PositionChanging
PositionChanging event.
Declaration
public event EventHandler PositionChanging
Event Type
System.EventHandler
|
Operators
Equality(CaretPosition, CaretPosition)
Implements the == operator.
Declaration
public static bool operator ==(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |
GreaterThan(CaretPosition, CaretPosition)
Implements the > operator.
Declaration
public static bool operator>(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |
GreaterThanOrEqual(CaretPosition, CaretPosition)
Implements the >= operator.
Declaration
public static bool operator >=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |
Inequality(CaretPosition, CaretPosition)
Implements the != operator.
Declaration
public static bool operator !=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |
LessThan(CaretPosition, CaretPosition)
Implements the < operator.
Declaration
public static bool operator <(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |
LessThanOrEqual(CaretPosition, CaretPosition)
Implements the <= operator.
Declaration
public static bool operator <=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition
left
The left. |
CaretPosition
right
The right. |
Returns
System.Boolean
The result of the operator. |