Type Alias NativeFileChooser
pub type NativeFileChooser = FileDialog;
Available on crate feature
dep_fltk
only.Expand description
FLTK’s NativeFileChooser
Aliased Type§
struct NativeFileChooser { /* private fields */ }
Implementations
§impl FileDialog
impl FileDialog
pub fn new(op: FileDialogType) -> FileDialog
pub fn new(op: FileDialogType) -> FileDialog
Creates an new file dialog
pub fn try_show(&mut self) -> Result<FileDialogAction, FltkError> ⓘ
pub fn try_show(&mut self) -> Result<FileDialogAction, FltkError> ⓘ
Shows the file dialog
pub fn show(&mut self)
pub fn show(&mut self)
Shows the file dialog
pub fn set_option(&mut self, opt: FileDialogOptions)
pub fn set_option(&mut self, opt: FileDialogOptions)
Sets the option for the dialog
pub fn set_type(&mut self, op: FileDialogType)
pub fn set_type(&mut self, op: FileDialogType)
Sets the type for the dialog
pub fn set_filter(&mut self, f: &str)
pub fn set_filter(&mut self, f: &str)
Sets the filter for the dialog, can be:
A single wildcard (e.g. "*.txt"
).
Multiple wildcards (e.g. "*.{cxx,h,H}"
).
A descriptive name followed by a \t
and a wildcard (e.g. "Text Files\t*.txt"
).
A list of separate wildcards with a \n
between each (e.g. "*.{cxx,H}\n*.txt"
).
A list of descriptive names and wildcards (e.g. "C++ Files\t*.{cxx,H}\nTxt Files\t*.txt"
)
pub fn set_preset_file(&mut self, f: &str)
pub fn set_preset_file(&mut self, f: &str)
Sets the default filename for the dialog
pub fn error_message(&self) -> Option<String> ⓘ
pub fn error_message(&self) -> Option<String> ⓘ
returns the error message from the file dialog