gtk.file_dialog

Module for [FileDialog] class

Types 3

A gtk.file_dialog.FileDialog object collects the arguments that are needed to present a file chooser dialog to the user, such as a title for the dialog and whether it should be modal.

The dialog is shown with gtk.file_dialog.FileDialog.open, gtk.file_dialog.FileDialog.save, etc. These APIs follow the GIO async pattern, and the result can be obtained by calling the corresponding finish function, for example gtk.file_dialog.FileDialog.openFinish.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
FileDialog self() nothrowReturns `this`, for use in `with` statements.
FileDialogGidBuilder builder() static nothrowGet builder for [gtk.file_dialog.FileDialog] Returns: New builder object
string acceptLabel() @property nothrowGet `acceptLabel` property. Returns: Label for the file chooser's accept button.
void acceptLabel(string propval) @property nothrowSet `acceptLabel` property. Params: propval = Label for the file chooser's accept button.
gtk.file_filter.FileFilter defaultFilter() @property nothrowGet `defaultFilter` property. Returns: The default filter, that is, the filter that is initially active in the file chooser dialog.
void defaultFilter(gtk.file_filter.FileFilter propval) @property nothrowSet `defaultFilter` property. Params: propval = The default filter, that is, the filter that is initially active in the file chooser dialog.
gio.list_model.ListModel filters() @property nothrowGet `filters` property. Returns: The list of filters.
void filters(gio.list_model.ListModel propval) @property nothrowSet `filters` property. Params: propval = The list of filters.
gio.file.File initialFile() @property nothrowGet `initialFile` property. Returns: The initial file, that is, the file that is initially selected in the file chooser dialog
void initialFile(gio.file.File propval) @property nothrowSet `initialFile` property. Params: propval = The initial file, that is, the file that is initially selected in the file chooser dialog
gio.file.File initialFolder() @property nothrowGet `initialFolder` property. Returns: The initial folder, that is, the directory that is initially opened in the file chooser dialog
void initialFolder(gio.file.File propval) @property nothrowSet `initialFolder` property. Params: propval = The initial folder, that is, the directory that is initially opened in the file chooser dialog
string initialName() @property nothrowGet `initialName` property. Returns: The initial name, that is, the filename that is initially selected in the file chooser dialog.
void initialName(string propval) @property nothrowSet `initialName` property. Params: propval = The initial name, that is, the filename that is initially selected in the file chooser dialog.
bool modal() @property nothrowGet `modal` property. Returns: Whether the file chooser dialog is modal.
void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the file chooser dialog is modal.
string title() @property nothrowGet `title` property. Returns: A title that may be shown on the file chooser dialog.
void title(string propval) @property nothrowSet `title` property. Params: propval = A title that may be shown on the file chooser dialog.
string getAcceptLabel() nothrow
gtk.file_filter.FileFilter getDefaultFilter() nothrowGets the filter that will be selected by default in the file chooser dialog. Returns: the current filter
gio.list_model.ListModel getFilters() nothrowGets the filters that will be offered to the user in the file chooser dialog. Returns: the filters, as a [gio.list_model.ListModel] of `GtkFileFilters`
gio.file.File getInitialFile() nothrowGets the file that will be initially selected in the file chooser dialog. Returns: the file
gio.file.File getInitialFolder() nothrowGets the folder that will be set as the initial folder in the file chooser dialog. Returns: the folder
string getInitialName() nothrowGets the name for the file that should be initially set. Returns: the name
bool getModal() nothrowReturns whether the file chooser dialog blocks interaction with the parent window while it is presented. Returns: `TRUE` if the file chooser dialog is modal
string getTitle() nothrowReturns the title that will be shown on the file chooser dialog. Returns: the title
void open(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function initiates a file selection operation by presenting a file chooser dialog to the user.
gio.file.File openFinish(gio.async_result.AsyncResult result)Finishes the [gtk.file_dialog.FileDialog.open] call and returns the resulting file.
void openMultiple(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function initiates a multi-file selection operation by presenting a file chooser dialog to the user.
gio.list_model.ListModel openMultipleFinish(gio.async_result.AsyncResult result)Finishes the [gtk.file_dialog.FileDialog.open] call and returns the resulting files in a [gio.list_model.ListModel].
void save(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function initiates a file save operation by presenting a file chooser dialog to the user.
gio.file.File saveFinish(gio.async_result.AsyncResult result)Finishes the [gtk.file_dialog.FileDialog.save] call and returns the resulting file.
void selectFolder(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function initiates a directory selection operation by presenting a file chooser dialog to the user.
gio.file.File selectFolderFinish(gio.async_result.AsyncResult result)Finishes the [gtk.file_dialog.FileDialog.selectFolder] call and returns the resulting file.
void selectMultipleFolders(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function initiates a multi-directory selection operation by presenting a file chooser dialog to the user.
gio.list_model.ListModel selectMultipleFoldersFinish(gio.async_result.AsyncResult result)Finishes the [gtk.file_dialog.FileDialog.selectMultipleFolders] call and returns the resulting files in a [gio.list_model.ListModel].
void setAcceptLabel(string acceptLabel = null) nothrowSets the label shown on the file chooser's accept button.
void setDefaultFilter(gtk.file_filter.FileFilter filter = null) nothrowSets the filter that will be selected by default in the file chooser dialog.
void setFilters(gio.list_model.ListModel filters = null) nothrowSets the filters that will be offered to the user in the file chooser dialog.
void setInitialFile(gio.file.File file = null) nothrowSets the file that will be initially selected in the file chooser dialog.
void setInitialFolder(gio.file.File folder = null) nothrowSets the folder that will be set as the initial folder in the file chooser dialog.
void setInitialName(string name = null) nothrowSets the name for the file that should be initially set. For saving dialogs, this will usually be pre-entered into the name field.
void setModal(bool modal) nothrowSets whether the file chooser dialog blocks interaction with the parent window while it is presented.
void setTitle(string title) nothrowSets the title that will be shown on the file chooser dialog.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.file_dialog.FileDialog] object. Returns: the new [gtk.file_dialog.FileDialog]

Fluent builder implementation template for gtk.file_dialog.FileDialog

Methods
T acceptLabel(string propval) nothrowSet `acceptLabel` property. Params: propval = Label for the file chooser's accept button. Returns: Builder instance for fluent chaining
T defaultFilter(gtk.file_filter.FileFilter propval) nothrowSet `defaultFilter` property. Params: propval = The default filter, that is, the filter that is initially active in the file chooser dialog.
T filters(gio.list_model.ListModel propval) nothrowSet `filters` property. Params: propval = The list of filters.
T initialFile(gio.file.File propval) nothrowSet `initialFile` property. Params: propval = The initial file, that is, the file that is initially selected in the file chooser dialog
T initialFolder(gio.file.File propval) nothrowSet `initialFolder` property. Params: propval = The initial folder, that is, the directory that is initially opened in the file chooser dialog Returns: Builder instance for fluent chaining
T initialName(string propval) nothrowSet `initialName` property. Params: propval = The initial name, that is, the filename that is initially selected in the file chooser dialog. Returns: Builder instance for fluent chaining
T modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the file chooser dialog is modal. Returns: Builder instance for fluent chaining
T title(string propval) nothrowSet `title` property. Params: propval = A title that may be shown on the file chooser dialog. Returns: Builder instance for fluent chaining

Fluent builder for gtk.file_dialog.FileDialog

Methods
FileDialog build() nothrowCreate object from builder. Returns: New object