[][src]Struct wfd::DialogParams

pub struct DialogParams<'a> {
    pub default_extension: &'a str,
    pub default_folder: &'a str,
    pub file_name: &'a str,
    pub file_name_label: &'a str,
    pub file_type_index: u32,
    pub file_types: Vec<(&'a str, &'a str)>,
    pub folder: &'a str,
    pub ok_button_label: &'a str,
    pub options: u32,
    pub save_as_item: &'a str,
    pub title: &'a str,
}

The parameters used when displaying a dialog box. All fields are optional and have appropriate default values

Fields

default_extension: &'a str

The default file extension to add to the returned file name when a file extension is not entered. Note that if this is not set no extensions will be present on returned filenames even when a specific file type filter is selected.

default_folder: &'a str

The path to the default folder that the dialog will navigate to on first usage. Subsequent usages of the dialog will remember the directory of the last selected file/folder.

file_name: &'a str

The filename to pre-populate in the dialog box

file_name_label: &'a str

The label to display to the left of the filename input box in the dialog

file_type_index: u32

Specifies the (1-based) index of the file type that is selected by default.

file_types: Vec<(&'a str, &'a str)>

The file types that are displayed in the File Type dropdown box in the dialog. The first element is the text description, i.e "Text Files (*.txt)" and the second element is the file extension filter pattern, with multiple entries separated by a semi-colon i.e "*.txt;*.log"

folder: &'a str

The path to the folder that is always selected when a dialog is opened, regardless of previous user action. This is not recommended for general use, instead default_folder should be used.

ok_button_label: &'a str

The text label to replace the default "Open" or "Save" text on the "OK" button of the dialog

options: u32

A set of bit flags to apply to the dialog. Setting invalid flags will result in the dialog failing to open. Flags should be a combination of FOS_* constants, the documentation for which can be found here

save_as_item: &'a str

The path to the existing file to use when opening a Save As dialog. Acts as a combination of folder and file_name, displaying the file name in the edit box, and selecting the containing folder as the initial folder in the dialog.

title: &'a str

The text displayed in the title bar of the dialog box

Trait Implementations

impl<'a> Debug for DialogParams<'a>[src]

impl<'a> Default for DialogParams<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DialogParams<'a>

impl<'a> Send for DialogParams<'a>

impl<'a> Sync for DialogParams<'a>

impl<'a> Unpin for DialogParams<'a>

impl<'a> UnwindSafe for DialogParams<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.