zng/ansi_text.rs
1#![cfg(feature = "ansi_text")]
2
3//! ANSI text widget.
4//!
5//! This widget displays text styled using [ANSI escape codes], commonly used to style terminal text.
6//!
7//! [ANSI escape codes]: https://en.wikipedia.org/wiki/ANSI_escape_code
8//!
9//! ```
10//! # let _scope = zng::APP.defaults(); let _ =
11//! zng::ansi_text::AnsiText! {
12//! txt = "[32;1mGREEN&BOLD[47m";
13//! }
14//! # ;
15//! ```
16//!
17//! The example above renders <code style="color:green;font-weight:bold;">GREEN&BOLD</code>.
18//!
19//! # Full API
20//!
21//! See [`zng_wgt_ansi_text`] for the full widget API.
22
23pub use zng_wgt_ansi_text::{
24 AnsiColor, AnsiStyle, AnsiText, AnsiTextParser, AnsiTxt, AnsiWeight, LineFnArgs, PageFnArgs, PanelFnArgs, TextFnArgs,
25};