value class ExpandPolicy private constructor(private val flag: Int)
Defines how a TrackedRange expands when text is inserted exactly at its boundaries.
This policy is used in methods like TextFieldBuffer.addStyle to configure whether the range expands to include text inserted at its start, end, or both boundaries.
Secondary Constructors
internal constructor(
startExpands: Boolean,
endExpands: Boolean,
) : this(
(if (startExpands) FLAG_EXPAND_START else 0) or (if (endExpands) FLAG_EXPAND_END else 0)
)
Companion Object
Properties
val InsideOnly = ExpandPolicy(0b0000)
The range will not expand when text is inserted at its boundaries. Text inserted exactly at the start or end will be placed outside the range.
val AtStart = ExpandPolicy(FLAG_EXPAND_START)
The range will expand when text is inserted at its start boundary. Text inserted exactly at the start will be included in the range.
val AtEnd = ExpandPolicy(FLAG_EXPAND_END)
The range will expand when text is inserted at its end boundary. Text inserted exactly at the end will be included in the range.
val AtBoth = ExpandPolicy(FLAG_EXPAND_START or FLAG_EXPAND_END)
The range will expand when text is inserted at either of its boundaries.