K3Content

class K3Content(val selection: K3TextRange = K3TextRange.Zero, val composition: K3TextRange? = null, val surroundingText: K3SurroundingText = K3SurroundingText.Empty, val inputContext: K3String = K3String.Empty)(source)

Describes a snapshot of the tracked content state.

This class implements referential equality to avoid expensive equality checks in state updates. If structural equality is needed, use the contentEquals and contentHashCode functions.

Constructors

Link copied to clipboard
constructor(selection: K3TextRange = K3TextRange.Zero, composition: K3TextRange? = null, surroundingText: K3SurroundingText = K3SurroundingText.Empty, inputContext: K3String = K3String.Empty)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The composition region in the text. If null, there is no composition region.

Link copied to clipboard
Link copied to clipboard

The input context, which represents the text before the selection, including any markers. It is an internal-ony context and should never be exposed to the application.

Link copied to clipboard
val offset: Int
Link copied to clipboard

The selection within content.

Link copied to clipboard

The selection's surrounding text.

Functions

Link copied to clipboard
fun contentEquals(other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
fun copy(selection: K3TextRange = this.selection, composition: K3TextRange? = this.composition, surroundingText: K3SurroundingText = this.surroundingText, inputContext: K3String = this.inputContext): K3Content
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int