Module zng::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§

  • Represents the ANSI style of a text run.
  • W Render text styled using ANSI escape sequences.
  • Iterator that parses ANSI escape codes.
  • Represents a segment of ANSI styled text that shares the same style.
  • Arguments for a widget function for a text line.
  • Arguments for a widget function for a stack of lines.
  • Arguments for a widget function for a stack of pages.
  • Arguments for a widget function for an ANSI styled text fragment.

Enums§