1use uxterm::*;
2
3fn main() -> std::io::Result<()> {
4 let mut view = View::new("Ice Cream Selector");
5
6 view.add(Label::new("Choose your ice cream flavours:"));
7 view.add(Checkbox::new("Vanilla"));
8 view.add(Checkbox::new("Chocolate"));
9 view.add(Checkbox::new("Strawberry"));
10 view.add(Checkbox::new("Mint"));
11 view.add(Checkbox::new("Cookie Dough"));
12 view.add(Label::new(
13 "Press TAB to switch, SPACE to toggle, ESC to finish",
14 ));
15
16 let result = run(view)?;
17
18 println!("\nYour ice cream will include:");
19 for ingredient in result {
20 println!("- {}", ingredient);
21 }
22
23 Ok(())
24}