Expand description
ANSI text widget.
This widget displays text styled using ANSI escape codes, commonly used to style terminal text.
zng::ansi_text::AnsiText! {
txt = "[32;1mGREEN&BOLD[47m";
}The example above renders GREEN&BOLD.
§Full API
See zng_wgt_ansi_text for the full widget API.
Structs§
- Ansi
Style - Represents the ANSI style of a text run.
- Ansi
Text WRender text styled using ANSI escape sequences.- Ansi
Text Parser - Iterator that parses ANSI escape codes.
- AnsiTxt
- Represents a segment of ANSI styled text that shares the same style.
- Line
FnArgs - Arguments for a widget function for a text line.
- Page
FnArgs - Arguments for a widget function for a stack of lines.
- Panel
FnArgs - Arguments for a widget function for a stack of pages.
- Text
FnArgs - Arguments for a widget function for an ANSI styled text fragment.
Enums§
- Ansi
Color - Named ANSI color.
- Ansi
Weight - Font weight defined by ANSI escape codes.