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