Skip to content

tsoding/rcui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

rcui

Simple TUI framework in Rust.

Example

Item List with 100 elements and vim-like navigation

use rcui::*;

fn main() {
    Rcui::exec(Proxy::wrap(
        |list, context, event| match event {
            Event::KeyStroke(key) => match *key as u8 as char {
                'q' => context.quit(),
                'j' => list.down(),
                'k' => list.up(),
                _ => {}
            }

            _ => {}
        },
        ItemList::new((0..100).map(|x| format!("item-{:02}", x)).collect()),
    ));
    println!("Quitting gracefully uwu");
}

Quick Start

$ cargo run --example 01_grid
$ cargo run --example 02_item_list

About

Simple TUI framework in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages