aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 1c6f6d020036d9d28ff7ee9f3932ce1858ca0be8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!---
SPDX-FileCopyrightText: 2019 Robin Krahl <robin.krahl@ireas.org>
SPDX-License-Identifier: MIT
-->

# dialog-rs

A Rust library for displaying dialog boxes using various backends.

[Documentation][]

Currently `dialog-rs` supports input, message, password and question dialogs.
It can use the `dialog`, `kdialog`, or `zenity` tools to display the dialog
boxes.  If none of these tools is available, the dialogs are printed to the
standard output.

## Example

```rust
use dialog::DialogBox;

let choice = dialog::Question::new("Would you like to install Rust?")
    .title("Rust Installation")
    .show()
    .expect("Could not display dialog box");
if choice == dialog::Choice::Yes {
    dialog::Message::new("You made the right choice!")
        .title("Rust Installation")
        .show()
        .expect("Could not display dialog box");
}
```

## Contact

For bug reports, patches, feature requests or other messages, please send a
mail to [dialog-rs-dev@ireas.org][].

## License

This project is licensed under the [MIT License][].

`dialog-rs` complies with [version 3.0 of the REUSE specification][reuse].

[Documentation]: https://docs.rs/dialog
[dialog-rs-dev@ireas.org]: mailto:dialog-rs-dev@ireas.org
[MIT license]: https://opensource.org/licenses/MIT
[reuse]: https://reuse.software/practices/3.0/