struct TextInputState
source · line 52public
public struct TextInputState(val surroundingText: String, val selection: Utf8Selection, val markedRange: Utf8Range? = None, val caretRect: LogicalRect = LogicalRect(LogicalPosition(0.0, 0.0), LogicalSize(0.0, 0.0)), val revision: Long = 0L)
An immutable UTF-8 snapshot, published to native text input only by an explicit request.
field markedRange
source · line 55public
val markedRange: Utf8Range? = None
field surroundingText
source · line 53public
val surroundingText: String
constructor constructor
source · line 52public
constructor(val surroundingText: String, val selection: Utf8Selection, val markedRange: Utf8Range? = None, val caretRect: LogicalRect = LogicalRect(LogicalPosition(0.0, 0.0), LogicalSize(0.0, 0.0)), val revision: Long = 0L)
parameter markedRange
source · line 55public
val markedRange: Utf8Range? = None
parameter caretRect
source · line 56public
val caretRect: LogicalRect = LogicalRect(LogicalPosition(0.0, 0.0), LogicalSize(0.0, 0.0))
parameter revision
source · line 57public
val revision: Long = 0L
parameter surroundingText
source · line 53public
val surroundingText: String
parameter selection
source · line 54public
val selection: Utf8Selection
field caretRect
source · line 56public
val caretRect: LogicalRect = LogicalRect(LogicalPosition(0.0, 0.0), LogicalSize(0.0, 0.0))
function validate
source · line 60public
public fun validate(): Unit
Validates the complete snapshot, including both directional selection endpoints.
function apply
source · line 71public
public fun apply(batch: TextInputBatch): TextInputState
Applies one transaction atomically to a new value; this snapshot remains unchanged.
parameter batch
source · line 71public
batch: TextInputBatch
field selection
source · line 54public
val selection: Utf8Selection
field revision
source · line 57public
val revision: Long = 0L
function equals
source · line 52publiccompiler-derived
operator fun equals(other: TextInputState): Boolean
This derived operation is available when each field or payload type supports same-type equality. Required types: String, Utf8Selection, Option<Utf8Range>, LogicalRect, Long.