Struct fltk::dialog::FileDialog [−][src]
Creates a file button
Implementations
impl FileDialog
[src]
pub fn new(op: FileDialogType) -> FileDialog
[src]
Creates an new file dialog
pub fn filename(&self) -> PathBuf
[src]
Returns the chosen file name
pub fn filenames(&self) -> Vec<PathBuf>
[src]
Returns the chosen file names
pub fn directory(&self) -> PathBuf
[src]
Returns the preset directory
pub fn set_directory<P: AsRef<Path>>(&mut self, dir: P) -> Result<(), FltkError>
[src]
Sets the starting directory
pub fn show(&mut self)
[src]
Shows the file dialog
pub fn set_option(&mut self, opt: FileDialogOptions)
[src]
Sets the option for the dialog
pub fn set_type(&mut self, op: FileDialogType)
[src]
Sets the type for the dialog
pub fn set_title(&mut self, title: &str)
[src]
Sets the title for the dialog
pub fn set_filter(&mut self, f: &str)
[src]
Sets the filter for the dialog, can be:
A single wildcard (eg. "*.txt"
)
Multiple wildcards (eg. "*.{cxx,h,H}"
)
A descriptive name followed by a \t
and a wildcard (eg. "Text Files\t*.txt"
)
A list of separate wildcards with a \n
between each (eg. "*.{cxx,H}\n*.txt"
)
A list of descriptive names and wildcards (eg. "C++ Files\t*.{cxx,H}\nTxt Files\t*.txt"
)
pub fn set_preset_file(&mut self, f: &str)
[src]
Sets the preset filter for the dialog
pub fn error_message(&self) -> Option<String>
[src]
returns the error message from the file dialog
Trait Implementations
impl Debug for FileDialog
[src]
impl Drop for FileDialog
[src]
Auto Trait Implementations
impl RefUnwindSafe for FileDialog
impl !Send for FileDialog
impl !Sync for FileDialog
impl Unpin for FileDialog
impl UnwindSafe for FileDialog
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,