pub struct FileDialog {
pub mode: FileChooserMode,
pub multiple: bool,
pub title: Option<String>,
pub filters: Vec<FileFilter>,
pub suggested_name: Option<String>,
pub folder: Option<PathBuf>,
}Expand description
A native file-dialog request for crate::ui::Ui::show_file_dialog.
Fields§
§mode: FileChooserModeOpen an existing file, pick a folder, or choose a file to save.
multiple: boolFor FileChooserMode::OpenFile: allow selecting several files.
title: Option<String>Dialog title; None uses the platform default for the mode.
filters: Vec<FileFilter>File-type filters; the first one is selected initially.
suggested_name: Option<String>Pre-filled file name for save dialogs.
folder: Option<PathBuf>Folder the dialog starts in.
Implementations§
Source§impl FileDialog
impl FileDialog
Sourcepub fn open_multiple() -> Self
pub fn open_multiple() -> Self
Choose one or more existing files.
Sourcepub fn pick_folder() -> Self
pub fn pick_folder() -> Self
Choose a folder.
Sourcepub fn filter(self, name: impl Into<String>, patterns: &[&str]) -> Self
pub fn filter(self, name: impl Into<String>, patterns: &[&str]) -> Self
Adds a file-type filter (name, glob patterns).
Sourcepub fn suggested_name(self, name: impl Into<String>) -> Self
pub fn suggested_name(self, name: impl Into<String>) -> Self
Pre-fills the file name (save dialogs).
Trait Implementations§
Source§impl Clone for FileDialog
impl Clone for FileDialog
Source§impl Debug for FileDialog
impl Debug for FileDialog
Source§impl Default for FileDialog
impl Default for FileDialog
impl Eq for FileDialog
Source§impl PartialEq for FileDialog
impl PartialEq for FileDialog
impl StructuralPartialEq for FileDialog
Auto Trait Implementations§
impl Forget for FileDialog
impl Freeze for FileDialog
impl Move for FileDialog
impl RefUnwindSafe for FileDialog
impl Send for FileDialogwhere
RawVecInner: Send,
impl Sync for FileDialogwhere
RawVecInner: Sync,
impl Unpin for FileDialog
impl UnsafeUnpin for FileDialogwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<FileFilter>: UnsafeUnpin,
impl UnwindSafe for FileDialogwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more