Macro cursive_extras::select_view
source · [−]macro_rules! select_view {
($($label:expr => $item:expr), *) => { ... };
}
Expand description
Convenience macro that makes SelectView
s easier to create
Example
let sv = select_view! {
"yes" => true,
"no" => false
}.on_submit(|v, _| v.quit());
let mut root = cursive::default();
root.add_fullscreen_layer(Dialog::around(sv).title("Select View"));
root.run();