Module ansi_text

Module ansi_text 

Source
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 = "GREEN&BOLD";
}

The example above renders GREEN&BOLD.

§Full API

See zng_wgt_ansi_text for the full widget API.

Structs§

AnsiStyle
Represents the ANSI style of a text run.
AnsiText
W Render text styled using ANSI escape sequences.
AnsiTextParser
Iterator that parses ANSI escape codes.
AnsiTxt
Represents a segment of ANSI styled text that shares the same style.
LineFnArgs
Arguments for a widget function for a text line.
PageFnArgs
Arguments for a widget function for a stack of lines.
PanelFnArgs
Arguments for a widget function for a stack of pages.
TextFnArgs
Arguments for a widget function for an ANSI styled text fragment.

Enums§

AnsiColor
Named ANSI color.
AnsiWeight
Font weight defined by ANSI escape codes.