Struct egui_file::FileDialog
source · pub struct FileDialog { /* private fields */ }Expand description
egui component that represents OpenFileDialog or SaveFileDialog.
Implementations§
source§impl FileDialog
impl FileDialog
sourcepub fn select_folder(initial_path: Option<PathBuf>) -> Self
pub fn select_folder(initial_path: Option<PathBuf>) -> Self
Create dialog that prompts the user to select a folder.
sourcepub fn open_file(initial_path: Option<PathBuf>) -> Self
pub fn open_file(initial_path: Option<PathBuf>) -> Self
Create dialog that prompts the user to open a file.
sourcepub fn save_file(initial_path: Option<PathBuf>) -> Self
pub fn save_file(initial_path: Option<PathBuf>) -> Self
Create dialog that prompts the user to save a file.
sourcepub fn default_filename(self, filename: impl Into<String>) -> Self
pub fn default_filename(self, filename: impl Into<String>) -> Self
Set the default file name.
sourcepub fn current_pos(self, current_pos: impl Into<Pos2>) -> Self
pub fn current_pos(self, current_pos: impl Into<Pos2>) -> Self
Set the window position.
sourcepub fn default_size(self, default_size: impl Into<Vec2>) -> Self
pub fn default_size(self, default_size: impl Into<Vec2>) -> Self
Set the window default size.
sourcepub fn resizable(self, resizable: bool) -> Self
pub fn resizable(self, resizable: bool) -> Self
Enable/disable resizing the window. Default is true.
sourcepub fn show_rename(self, rename: bool) -> Self
pub fn show_rename(self, rename: bool) -> Self
Show the Rename button. Default is true.
sourcepub fn show_new_folder(self, new_folder: bool) -> Self
pub fn show_new_folder(self, new_folder: bool) -> Self
Show the New Folder button. Default is true.
sourcepub fn show_drives(self, drives: bool) -> Self
pub fn show_drives(self, drives: bool) -> Self
Show the mapped drives on Windows. Default is true.
sourcepub fn show_files_filter(self, filter: Filter<PathBuf>) -> Self
pub fn show_files_filter(self, filter: Filter<PathBuf>) -> Self
Set a function to filter listed files.
sourcepub fn filename_filter(self, filter: Filter<String>) -> Self
pub fn filename_filter(self, filter: Filter<String>) -> Self
Set a function to filter the selected filename.
sourcepub fn dialog_type(&self) -> DialogType
pub fn dialog_type(&self) -> DialogType
Get the dialog type.
Trait Implementations§
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§
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