[][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.


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!"));
  // When your done setting run cursive
  // siv.run();



The TabPanel is an ease of use wrapper around a TabView and its TabBar. Additionally the TabBar in the Panel can be horizontally aligned, by default it is set to be left aligned.


Main struct which manages views