Table of Contents

Class Cursor

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

Represents a cursor with position in screen coordinates and shape.

public record Cursor : IEquatable<Cursor>
Inheritance
Cursor
Implements
Inherited Members

Remarks

The position is always in screen coordinates. Views are responsible for converting from their content-area or viewport coordinates to screen coordinates before setting the cursor.

Immutable value type - use with 'with' expression to modify:

Cursor newCursor = currentCursor with { Position = new Point(5, 0) };

To hide the cursor, set Position to null or set the Style property to Hidden.

Constructors

Cursor()
Cursor(Cursor)

Properties

EqualityContract
IsVisible

Gets whether the cursor is visible (has valid position).

Position

Gets the cursor position in screen coordinates.

Style

Gets the cursor style.

Methods

Equals(object?)
Equals(Cursor?)
GetHashCode()
PrintMembers(StringBuilder)
ToString()

Returns string representation for debugging.

Operators

operator ==(Cursor?, Cursor?)
operator !=(Cursor?, Cursor?)