Struct egui_file_dialog::FileDialogLabels
source · pub struct FileDialogLabels {Show 23 fields
pub title_select_directory: String,
pub title_select_file: String,
pub title_save_file: 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 selected_directory: String,
pub selected_file: String,
pub file_name: String,
pub open_button: String,
pub save_button: String,
pub cancel_button: 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_save_file: StringThe default window title used when the dialog is in DialogMode::SaveFile mode.
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
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.
file_name: StringText that appears in front of the file name input in the bottom panel.
Button text to open the selected item.
Button text to save the file.
Button text to cancel the dialog.
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 moresource§impl Debug for FileDialogLabels
impl Debug for FileDialogLabels
source§impl Default for FileDialogLabels
impl Default for FileDialogLabels
source§impl PartialEq for FileDialogLabels
impl PartialEq for FileDialogLabels
source§fn eq(&self, other: &FileDialogLabels) -> bool
fn eq(&self, other: &FileDialogLabels) -> bool
self and other values to be equal, and is used
by ==.