Back to API Reference
Struct

CaretContext

sealed

Caret context after a change: the modifiers covering the caret (full set plus what entered and left since the previous state), the selection it was computed for, and the source editor for follow-up queries (IsStyleActive<T>, TryGetStyleParameter<T>, caret geometry). The lists are reused between dispatches — read them during the event call, copy if you need to keep them.

public IReadOnlyList<BaseModifier> Active{ get }

Every modifier whose span covers the caret (or the whole selection).

public IReadOnlyList<BaseModifier> Entered{ get }

Modifiers the caret just entered.

public IReadOnlyList<BaseModifier> Exited{ get }

Modifiers the caret just left.

public TextSelection Selection{ get }

The selection the context was computed for.

public bool IsComposing{ get }

Whether an IME composition is in progress (toolbars typically disable).

public UniTextEditable Editable{ get }

The editor that raised the change.

[ctor]public CaretContext()