Expand description
Semtext is a Rust library for building text user interfaces, or TUIs.
Example
use semtext::{grid_area, input::Action, widget::Label, Screen, Widget};
async fn async_main() -> Result<(), Box<dyn std::error::Error>> {
let mut screen = Screen::new()?;
let a = Label::new("Hello!").into_button();
let grid = grid_area!(
[. . .]
[. a .]
[. . .]
)?;
while screen.step(&grid).await? != Action::Quit() {}
Ok(())
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
futures::executor::block_on(async_main())
}
Modules
Keyboard and mouse input handling
User interface layout
Text styles and themes
User Interface Widgets
Macros
Structs
Terminal screen
Enums
Enum of semtext
errors
Traits
User interface component