This module provides functionality for rendering
Widgets, including functionality to make structural and/or visual
changes at rendering time. To get started, turn your ordinary
String into a
simpleText; if you want access to
Text for formatting purposes, use
prepareText followed by
A formatter makes changes to text at rendering time.
It'd be nice if formatters were just
:: , but
some formatting use cases involve knowing the size of the rendering
area, which is not known until render time (e.g., text wrapping).
Thus, a formatter takes a
DisplayRegion and runs at render time.
Prepare a string for rendering and assign it the specified default attribute.
Construct a Widget directly from an attribute and a String. This
is recommended if you don't need to use a
Construct a text widget formatted with the specified formatters. the formatters will be applied in the order given here, so be aware of how the formatters will modify the text (and affect each other).
a &.& b applies
a followed by
A highlight formatter takes a regular expression used to scan the text and an attribute to assign to matches. Highlighters only scan non-whitespace tokens in the text stream.