blob: bb36fb61892c691143cf967f7ecaa70cb847127f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT
use std::io::Result;
use dialog::DialogBox;
fn main() -> Result<()> {
let input1 = dialog::Input::new("Please enter something").show()?;
let input2 = dialog::Input::new("Please enter something")
.title("Input form")
.show()?;
let input3 = dialog::Input::new("Please enter something with a default")
.title("Input form")
.default("input")
.show()?;
println!("Input 1: {:?}", input1);
println!("Input 2: {:?}", input2);
println!("Input 3: {:?}", input3);
Ok(())
}
|