cursive/examples/hello_world.rs

16 lines
313 B
Rust
Raw Normal View History

2015-05-09 19:18:25 +00:00
extern crate cursive;
use cursive::Cursive;
2015-05-15 01:38:58 +00:00
use cursive::view::TextView;
2015-05-09 19:18:25 +00:00
fn main() {
let mut siv = Cursive::new();
2015-05-15 01:38:58 +00:00
// We can quit by pressing q
2015-05-24 00:07:22 +00:00
siv.add_global_callback('q' as i32, |s| s.quit());
2015-05-09 19:18:25 +00:00
2015-05-15 23:06:48 +00:00
siv.add_layer(TextView::new("Hello World!\nPress q to quit the application."));
2015-05-09 19:18:25 +00:00
siv.run();
}