pub struct FileDialogBuilder { /* private fields */ }
v4_10
only.Expand description
A builder-pattern type to construct FileDialog
objects.
Implementations§
Source§impl FileDialogBuilder
impl FileDialogBuilder
Sourcepub fn accept_label(self, accept_label: impl Into<GString>) -> Self
pub fn accept_label(self, accept_label: impl Into<GString>) -> Self
Label for the file chooser’s accept button.
Sourcepub fn default_filter(self, default_filter: &FileFilter) -> Self
pub fn default_filter(self, default_filter: &FileFilter) -> Self
The default filter, that is, the filter that is initially active in the file chooser dialog.
If the default filter is None
, the first filter of filters
is used as the default filter. If that property contains no filter, the dialog will
be unfiltered.
If filters
is not None
, the default filter should be part
of the list. If it is not, the dialog may choose to not make it available.
Sourcepub fn filters(self, filters: &impl IsA<ListModel>) -> Self
pub fn filters(self, filters: &impl IsA<ListModel>) -> Self
The list of filters.
See default-filter
about how those two properties interact.
Sourcepub fn initial_file(self, initial_file: &impl IsA<File>) -> Self
pub fn initial_file(self, initial_file: &impl IsA<File>) -> Self
The initial file, that is, the file that is initially selected in the file chooser dialog
This is a utility property that sets both initial-folder
and
initial-name
.
Sourcepub fn initial_folder(self, initial_folder: &impl IsA<File>) -> Self
pub fn initial_folder(self, initial_folder: &impl IsA<File>) -> Self
The initial folder, that is, the directory that is initially opened in the file chooser dialog
Sourcepub fn initial_name(self, initial_name: impl Into<GString>) -> Self
pub fn initial_name(self, initial_name: impl Into<GString>) -> Self
The initial name, that is, the filename that is initially selected in the file chooser dialog.
Sourcepub fn title(self, title: impl Into<GString>) -> Self
pub fn title(self, title: impl Into<GString>) -> Self
A title that may be shown on the file chooser dialog.
Sourcepub fn build(self) -> FileDialog
pub fn build(self) -> FileDialog
Build the FileDialog
.