Struct egui_file_dialog::FileDialogLabels

source ·
pub struct FileDialogLabels {
Show 34 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 show_hidden: 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 selected_directory: String, pub selected_file: String, pub selected_items: String, pub file_name: String, pub file_filter_all_files: 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: String

The default window title used when the dialog is in DialogMode::SelectDirectory mode.

§title_select_file: String

The default window title used when the dialog is in DialogMode::SelectFile mode.

§title_select_multiple: String

The default window title used when the dialog is in DialogMode::SelectMultiple mode.

§title_save_file: String

The default window title used when the dialog is in DialogMode::SaveFile mode.

§cancel: String

Text displayed in the buttons to cancel the current action.

§overwrite: String

Text displayed in the buttons to overwrite something, such as a file.

§reload: String

Text used for the option to reload the file dialog.

§show_hidden: String

Text used for the option to show or hide hidden files and folders.

§heading_pinned: String

Heading of the “Pinned” sections in the left panel

§heading_places: String

Heading of the “Places” section in the left panel

§heading_devices: String

Heading of the “Devices” section in the left panel

§heading_removable_devices: String

Heading of the “Removable Devices” section in the left panel

§home_dir: String

Name of the home directory

§desktop_dir: String

Name of the desktop directory

§documents_dir: String

Name of the documents directory

§downloads_dir: String

Name of the downloads directory

§audio_dir: String

Name of the audio directory

§pictures_dir: String

Name of the pictures directory

§videos_dir: String

Name of the videos directory

§pin_folder: String

Text used for the option to pin a folder.

§unpin_folder: String

Text used for the option to unpin a folder.

§selected_directory: String

Text that appears in front of the selected folder preview in the bottom panel.

§selected_file: String

Text that appears in front of the selected file preview in the bottom panel.

§selected_items: String

Text that appears in front of the selected items preview in the bottom panel.

§file_name: String

Text that appears in front of the file name input in the bottom panel.

§file_filter_all_files: String

Text displayed in the file filter dropdown for the “All Files” option.

§open_button: String

Button text to open the selected item.

§save_button: String

Button text to save the file.

§cancel_button: String

Button text to cancel the dialog.

§overwrite_file_modal_text: String

Text displayed after the path within the modal to overwrite the selected file.

§err_empty_folder_name: String

Error if no folder name was specified.

§err_empty_file_name: String

Error if no file name was specified.

§err_directory_exists: String

Error if the directory already exists.

§err_file_exists: String

Error if the file already exists.

Trait Implementations§

source§

impl Clone for FileDialogLabels

source§

fn clone(&self) -> FileDialogLabels

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FileDialogLabels

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FileDialogLabels

source§

fn default() -> Self

Creates a new object with the default english labels.

source§

impl PartialEq for FileDialogLabels

source§

fn eq(&self, other: &FileDialogLabels) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for FileDialogLabels

source§

impl StructuralPartialEq for FileDialogLabels

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,