The generic style-editing surface a smidr.widgets.UITextArea exposes to styling modules. It lets a module (e.g. UIRichStyler) read and transform the editor's opaque per-character style words without the module depending on the concrete widget — the editor stays policy-free and the modules stay widget-free, so the dependency only ever points widgets -> text.

Variables

read onlycaretIndex:Int

Current caret position (char index).

read onlyselectionEnd:Int

Selection end (max of caret/anchor).

read onlyselectionStart:Int

Selection start (min of caret/anchor).

read onlystyledText:String

The full text buffer.

typingStyle:Int

Style word applied to newly typed characters.

Methods

hasStyledSelection():Bool

true while a (non-empty) selection exists.

styleAt(index:Int):Int

The style word at a character index (clamped).

styleParagraphs(map:Int ‑> Int):Void

Transforms the style of every character in the paragraphs the selection touches.

styleSelection(map:Int ‑> Int):Void

Transforms the style of every selected character (or typingStyle when nothing is selected).