Skip to main content

Crate inputbox

Crate inputbox 

Source
Expand description

Cross-platform input box library.

The entry point is the InputBox struct, which you can configure using the builder pattern and then call run() to display the input dialog and get the user’s input.

§Usage

use inputbox::InputBox;

let input = InputBox::new().title("Title").prompt("Prompt").default_text("Default");
let result: Option<String> = input.run();
// Or use a specific backend:
// let result = input.run_with(&inputbox::backend::Zenity::default());
println!("Result: {:?}", result);

See crate::backend for details on the available backends and their individual features and limitations.

Modules§

backend
Backend implementations for different platforms.

Structs§

InputBox
An input box configuration.

Enums§

InputMode
Input mode for the input box.

Constants§

DEFAULT_CANCEL_LABEL
Default label for the cancel button.
DEFAULT_OK_LABEL
Default label for the OK/confirm button.
DEFAULT_TITLE
Default title for the input box dialog.