pub struct FileDialogLabels {Show 38 fields
pub title_select_directory: String,
pub title_select_file: String,
pub title_select_multiple: String,
pub title_save_file: String,
pub cancel: String,
pub overwrite: String,
pub reload: String,
pub working_directory: String,
pub show_hidden: String,
pub show_system_files: String,
pub heading_pinned: String,
pub heading_places: String,
pub heading_devices: String,
pub heading_removable_devices: String,
pub home_dir: String,
pub desktop_dir: String,
pub documents_dir: String,
pub downloads_dir: String,
pub audio_dir: String,
pub pictures_dir: String,
pub videos_dir: String,
pub pin_folder: String,
pub unpin_folder: String,
pub rename_pinned_folder: String,
pub selected_directory: String,
pub selected_file: String,
pub selected_items: String,
pub file_name: String,
pub file_filter_all_files: String,
pub save_extension_any: String,
pub open_button: String,
pub save_button: String,
pub cancel_button: String,
pub overwrite_file_modal_text: String,
pub err_empty_folder_name: String,
pub err_empty_file_name: String,
pub err_directory_exists: String,
pub err_file_exists: String,
}Expand description
Contains the text labels that the file dialog uses.
This is used to enable multiple language support.
§Example
The following example shows how the default title of the dialog can be displayed in German instead of English.
use egui_file_dialog::{FileDialog, FileDialogLabels};
let labels_german = FileDialogLabels {
title_select_directory: "📁 Ordner Öffnen".to_string(),
title_select_file: "📂 Datei Öffnen".to_string(),
title_save_file: "📥 Datei Speichern".to_string(),
..Default::default()
};
let file_dialog = FileDialog::new().labels(labels_german);Fields§
§title_select_directory: StringThe default window title used when the dialog is in DialogMode::SelectDirectory mode.
title_select_file: StringThe default window title used when the dialog is in DialogMode::SelectFile mode.
title_select_multiple: StringThe default window title used when the dialog is in DialogMode::SelectMultiple mode.
title_save_file: StringThe default window title used when the dialog is in DialogMode::SaveFile mode.
cancel: StringText displayed in the buttons to cancel the current action.
overwrite: StringText displayed in the buttons to overwrite something, such as a file.
reload: StringText used for the option to reload the file dialog.
working_directory: StringText used for the option to open the working directory.
Text used for the option to show or hide hidden files and folders.
show_system_files: StringText used for the option to show or hide system files.
heading_pinned: StringHeading of the “Pinned” sections in the left panel
heading_places: StringHeading of the “Places” section in the left panel
heading_devices: StringHeading of the “Devices” section in the left panel
heading_removable_devices: StringHeading of the “Removable Devices” section in the left panel
home_dir: StringName of the home directory
desktop_dir: StringName of the desktop directory
documents_dir: StringName of the documents directory
downloads_dir: StringName of the downloads directory
audio_dir: StringName of the audio directory
pictures_dir: StringName of the pictures directory
videos_dir: StringName of the videos directory
pin_folder: StringText used for the option to pin a folder.
unpin_folder: StringText used for the option to unpin a folder.
rename_pinned_folder: StringText used for the option to rename a pinned folder.
selected_directory: StringText that appears in front of the selected folder preview in the bottom panel.
selected_file: StringText that appears in front of the selected file preview in the bottom panel.
selected_items: StringText that appears in front of the selected items preview in the bottom panel.
file_name: StringText that appears in front of the file name input in the bottom panel.
file_filter_all_files: StringText displayed in the file filter dropdown for the “All Files” option.
save_extension_any: StringText displayed in the save extension dropdown for the “Any” option.
Button text to open the selected item.
Button text to save the file.
Button text to cancel the dialog.
overwrite_file_modal_text: StringText displayed after the path within the modal to overwrite the selected file.
err_empty_folder_name: StringError if no folder name was specified.
err_empty_file_name: StringError if no file name was specified.
err_directory_exists: StringError if the directory already exists.
err_file_exists: StringError if the file already exists.
Trait Implementations§
Source§impl Clone for FileDialogLabels
impl Clone for FileDialogLabels
Source§fn clone(&self) -> FileDialogLabels
fn clone(&self) -> FileDialogLabels
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more