[−][src]Crate cursive_tabs
This crate provides a tabbing view for gyscos/cursive views. It is build to be as simple as possible.
The behaviour is oriented to be similar to StackView
of cursive, but with the advantage of selectively displaying
views without needing to delete foremost one.
Example
All you need to do to create a new TabView
is:
let mut tabs = TabView::new();
You can then use the provided methods to modify the content of the TabView
Consuming and non-consuming are both provided.
Full Example
use cursive::{Cursive, views::{TextView, Dialog}}; use cursive_tabs::TabView; fn main() { let mut siv = Cursive::default(); let mut tabs = TabView::new(); // That is all what is needed to display an empty TabView, but of course // you can add your own tabs now and switch them around as you want! tabs.add_tab("First", TextView::new("Our first view!")); siv.add_layer(Dialog::around(tabs)); // When your done setting run cursive // siv.run(); }
Structs
TabPanel | The |
TabView | Main struct which manages views |