aboutsummaryrefslogtreecommitdiff
path: root/src/backends/mod.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-08 03:16:20 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-08 04:54:20 +0100
commitec84c425282c3fd26f5e862b7864ad2ae7ec1e2e (patch)
tree347baad0fc42290ab5da2330d828f284d1ee8d88 /src/backends/mod.rs
parent1c76a540d647f351e27498e6f2135ff404853693 (diff)
downloaddialog-rs-ec84c425282c3fd26f5e862b7864ad2ae7ec1e2e.tar.gz
dialog-rs-ec84c425282c3fd26f5e862b7864ad2ae7ec1e2e.tar.bz2
Add input dialog boxes
This patch implements input dialog boxes. This required some refactoring in the dialog backend to allow additional arguments after the width and the height.
Diffstat (limited to 'src/backends/mod.rs')
-rw-r--r--src/backends/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backends/mod.rs b/src/backends/mod.rs
index c316307..1abb8d1 100644
--- a/src/backends/mod.rs
+++ b/src/backends/mod.rs
@@ -17,6 +17,9 @@ use std::io::Result;
/// [`default_backend`]: ../function.default_backend.html
/// [`show_with`]: ../trait.DialogBox.html#method.show_with
pub trait Backend {
+ /// Shows the given input dialog and returns the input.
+ fn show_input(&self, input: &super::Input) -> Result<Option<String>>;
+
/// Shows the given message dialog.
fn show_message(&self, message: &super::Message) -> Result<()>;
}