cursive-tabs 0.2.0

Tabs for gyscos/cursive views
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use cursive::views::TextView;
use cursive_tabs::TabView;

use cursive::Cursive;

fn main() {
    let mut siv = Cursive::default();
    let tabs = TabView::new()
        .with_tab(0, TextView::new("First"))
        .with_tab(1, TextView::new("Second"))
        .with_active_tab(0).expect("Setting tab has failed");
    siv.add_layer(tabs);
    siv.run();
}