New to Telerik UI for WinFormsStart a free 30-day trial

Represents a CaretPosition information.

Definition

Namespace:Telerik.WinForms.Controls.SyntaxEditor.UI

Assembly:Telerik.WinControls.SyntaxEditor.dll

Syntax:

C#
public class CaretPosition : IComparable<CaretPosition>, IEquatable<CaretPosition>, IDisposable

Inheritance: objectCaretPosition

Implements: IComparable<CaretPosition>IDisposableIEquatable<CaretPosition>

Constructors

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(CaretPosition position, PositionAnchoringType anchoringType)
Parameters:positionCaretPosition

The position.

anchoringTypePositionAnchoringType

Type of the anchoring.

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(CaretPosition position)
Parameters:positionCaretPosition

The position.

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(TextDocument document, int lineNumber, int columnNumber, PositionAnchoringType anchoringType)
Parameters:documentTextDocument

The document.

lineNumberint

The line number.

columnNumberint

The column number.

anchoringTypePositionAnchoringType

Type of the anchoring.

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(TextDocument document, int lineNumber, int columnNumber)
Parameters:documentTextDocument

The document.

lineNumberint

The line number.

columnNumberint

The column number.

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(TextDocument document, PositionAnchoringType anchoringType)
Parameters:documentTextDocument

The document.

anchoringTypePositionAnchoringType

Type of the anchoring.

Initializes a new instance of the CaretPosition class.

C#
public CaretPosition(TextDocument document)
Parameters:documentTextDocument

The document.

Properties

Gets the type of the anchoring.

C#
public PositionAnchoringType AnchoringType { get; }
Property Value:

The type of the anchoring.

Gets the column number.

C#
public int ColumnNumber { get; }
Property Value:

The column number.

Gets the display column number.

C#
public int DisplayColumnNumber { get; }
Property Value:

The display column number.

Gets the display line number.

C#
public int DisplayLineNumber { get; }
Property Value:

The display line number.

Gets the document.

C#
public TextDocument Document { get; }
Property Value:

The document.

Gets the index.

C#
public int Index { get; }
Property Value:

The index.

Gets a value indicating whether this instance is anchored.

C#
public bool IsAnchored { get; }

Gets or sets the last tracked column. NOTE: Used for up/down.

C#
public int LastTrackedColumn { get; set; }
Property Value:

The last tracked column.

Gets the line number.

C#
public int LineNumber { get; }
Property Value:

The line number.

Gets or sets the size of the tab.

C#
public int TabSize { get; set; }
Property Value:

The size of the tab.

Methods

Compares the current object with another object of the same type.

C#
public int CompareTo(CaretPosition other)
Parameters:otherCaretPosition

An object to compare with this object.

Returns:

int

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: IComparable<CaretPosition>.CompareTo(CaretPosition)

Converts from index.

C#
public static CaretPosition ConvertFromIndex(TextDocument document, int index)
Parameters:documentTextDocument

The document.

indexint

The index.

Returns:

CaretPosition

CaretPosition.

Converts to index.

C#
public static int ConvertToIndex(CaretPosition position)
Parameters:positionCaretPosition

The position.

Returns:

int

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Releases unmanaged and - optionally - managed resources.

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Indicates whether the current object is equal to another object of the same type.

C#
public bool Equals(CaretPosition other)
Parameters:otherCaretPosition

An object to compare with this object.

Returns:

bool

true if the current object is equal to the other parameter; otherwise, false.

Implements: IEquatable<CaretPosition>.Equals(CaretPosition)

Determines whether the specified object is equal to this instance.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides: object.Equals(object)

Returns a hash code for this instance.

C#
public override int GetHashCode()
Returns:

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides: object.GetHashCode()

Determines whether [is at word start].

C#
public bool IsAtWordStart()
Returns:

bool

true if [is at word start]; otherwise, false.

Moves the line down.

C#
public bool MoveLineDown()
Returns:

bool

true if XXXX, false otherwise.

Moves the line up.

C#
public bool MoveLineUp()
Returns:

bool

true if XXXX, false otherwise.

Moves to current word end.

C#
public bool MoveToCurrentWordEnd()
Returns:

bool

true if XXXX, false otherwise.

Moves to current word start.

C#
public bool MoveToCurrentWordStart()
Returns:

bool

true if XXXX, false otherwise.

Moves to end of document.

C#
public void MoveToEndOfDocument()

Moves to home.

C#
public void MoveToHome()

Moves to index.

C#
public bool MoveToIndex(int indexParameter)
Parameters:indexParameterint

The index.

Returns:

bool

true if XXXX, false otherwise.

Moves to line.

C#
public void MoveToLine(int lineNumber)
Parameters:lineNumberint

Moves to line end.

C#
public void MoveToLineEnd()

Moves to line start.

C#
public void MoveToLineStart()

Moves to next character.

C#
public bool MoveToNextCharacter()
Returns:

bool

true if XXXX, false otherwise.

Moves to next word.

C#
public bool MoveToNextWord()
Returns:

bool

true if XXXX, false otherwise.

Moves to position.

C#
public bool MoveToPosition(CaretPosition position)
Parameters:positionCaretPositionReturns:

bool

Moves to previous character.

C#
public bool MoveToPreviousCharacter()
Returns:

bool

true if XXXX, false otherwise.

Moves to previous word.

C#
public bool MoveToPreviousWord()
Returns:

bool

true if XXXX, false otherwise.

Moves to start of document.

C#
public void MoveToStartOfDocument()

Called when [position changed].

C#
protected virtual void OnPositionChanged()

Called when [position changing].

C#
protected virtual void OnPositionChanging()

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()

Events

PositionChanged event.

C#
public event EventHandler PositionChanged

PositionChanging event.

C#
public event EventHandler PositionChanging

Operators

Implements the != operator.

C#
public static bool operator !=(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.

Implements the < operator.

C#
public static bool operator <(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.

Implements the <= operator.

C#
public static bool operator <=(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.

Implements the == operator.

C#
public static bool operator ==(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.

Implements the > operator.

C#
public static bool operator >(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.

Implements the >= operator.

C#
public static bool operator >=(CaretPosition left, CaretPosition right)
Parameters:leftCaretPosition

The left.

rightCaretPosition

The right.

Returns:

bool

The result of the operator.