Cursor

data class Cursor(rowIdx: Int, colIdx: Int)

Represents the position where a user edits a document.

Constructors

Cursor
Link copied to clipboard
common
fun Cursor(rowIdx: Int = 0, colIdx: Int = 0)

Functions

canMoveDown
Link copied to clipboard
common
fun canMoveDown(textBuffer: EditableTextBuffer): Boolean
canMoveLeft
Link copied to clipboard
common
fun canMoveLeft(): Boolean
canMoveRight
Link copied to clipboard
common
fun canMoveRight(textBuffer: EditableTextBuffer): Boolean
canMoveUp
Link copied to clipboard
common
fun canMoveUp(): Boolean
component1
Link copied to clipboard
common
operator fun component1(): Int
component2
Link copied to clipboard
common
operator fun component2(): Int
copy
Link copied to clipboard
common
fun copy(rowIdx: Int = 0, colIdx: Int = 0): Cursor
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
isAtTheStartOfARow
Link copied to clipboard
common
fun isAtTheStartOfARow(): Boolean
isAtTheStartOfTheFirstRow
Link copied to clipboard
common
fun isAtTheStartOfTheFirstRow(): Boolean
move
Link copied to clipboard
common
fun move(direction: MovementDirection, textBuffer: EditableTextBuffer): Cursor
Moves this Cursor in a direction.
toString
Link copied to clipboard
common
open override fun toString(): String
withColumn
Link copied to clipboard
common
fun withColumn(colIdx: Int): Cursor
withRelativeColumn
Link copied to clipboard
common
fun withRelativeColumn(delta: Int): Cursor
withRelativeRow
Link copied to clipboard
common
fun withRelativeRow(delta: Int): Cursor
withRow
Link copied to clipboard
common
fun withRow(rowIdx: Int): Cursor

Properties

colIdx
Link copied to clipboard
common
val colIdx: Int = 0
position
Link copied to clipboard
common
val position: Position
rowIdx
Link copied to clipboard
common
val rowIdx: Int = 0

Sources

(source)
Link copied to clipboard