backend_zenity/
backend-zenity.rs1use dialog::backends;
5use dialog::DialogBox;
6
7fn main() -> dialog::Result<()> {
8 let mut backend = backends::Zenity::new();
9
10 dialog::Message::new("This is a message.")
11 .title("And this is a title:")
12 .show_with(&backend)?;
13
14 backend.set_width(500);
15 backend.set_height(200);
16 dialog::Message::new("This is a message with a fixed size.")
17 .title("And this is a title:")
18 .show_with(&backend)?;
19
20 let mut backend = backends::Zenity::new();
21 backend.set_timeout(5);
22 dialog::Message::new("This box should disappear after five seconds.")
23 .title("And this is a title:")
24 .show_with(&backend)
25}