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.
Set the open button text.
Set the save button text.
Set the cancel button text.
Set the new folder button text.
Sourcepub fn new_folder_name_text(self, text: Cow<'static, str>) -> Self
pub fn new_folder_name_text(self, text: Cow<'static, str>) -> Self
Set the new folder name text.
Set the refresh button hover text.
Set the parent folder button hover text.
Set the rename button text.
Sourcepub fn file_label_text(self, text: Cow<'static, str>) -> Self
pub fn file_label_text(self, text: Cow<'static, str>) -> Self
Set the file label text.
Set the show hidden checkbox text.
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’s current position.
Sourcepub fn default_pos(self, default_pos: impl Into<Pos2>) -> Self
pub fn default_pos(self, default_pos: impl Into<Pos2>) -> Self
Set the window’s default 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’s 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
.
pub fn multi_select(self, multi_select: bool) -> Self
pub fn has_multi_select(&self) -> bool
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 keep_on_top(self, keep_on_top: bool) -> Self
pub fn keep_on_top(self, keep_on_top: bool) -> Self
Set to true in order to keep this window on top of other windows. Default is false
.
pub fn with_fs(self, fs: Box<dyn Vfs>) -> Self
Sourcepub fn show_system_files(self, show_system_files: bool) -> Self
pub fn show_system_files(self, show_system_files: bool) -> Self
Set to true in order to show system files. Default is false
.
Sourcepub fn dialog_type(&self) -> DialogType
pub fn dialog_type(&self) -> DialogType
Get the dialog type.