FileDialog

open class FileDialog(val gtkFileDialogPointer: <Error class: unknown class><<Error class: unknown class>>)

A GtkFileDialog 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 method@Gtk.FileDialog.open, method@Gtk.FileDialog.save, etc.

Since

4.10

Constructors

Link copied to clipboard
constructor()

Creates a new GtkFileDialog object.

constructor(gtkFileDialogPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open var acceptLabel: String?

Label for the file chooser's accept button.

Link copied to clipboard

The default filter, that is, the filter that is initially active in the file chooser dialog.

Link copied to clipboard
open var filters: <Error class: unknown class>?

The list of filters.

Link copied to clipboard
val gtkFileDialogPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var initialFile: <Error class: unknown class>?

The initial file, that is, the file that is initially selected in the file chooser dialog

Link copied to clipboard
open var initialFolder: <Error class: unknown class>?

The initial folder, that is, the directory that is initially opened in the file chooser dialog

Link copied to clipboard
open var initialName: String?

The initial name, that is, the filename that is initially selected in the file chooser dialog.

Link copied to clipboard
open var modal: Boolean

Whether the file chooser dialog is modal.

Link copied to clipboard
open var title: String

A title that may be shown on the file chooser dialog.

Functions

Link copied to clipboard
open fun open(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function initiates a file selection operation by presenting a file chooser dialog to the user.

Link copied to clipboard
open fun openFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.FileDialog.open call and returns the resulting file.

Link copied to clipboard
open fun openMultiple(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function initiates a multi-file selection operation by presenting a file chooser dialog to the user.

Link copied to clipboard
open fun openMultipleFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.FileDialog.open call and returns the resulting files in a GListModel.

Link copied to clipboard
open fun save(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function initiates a file save operation by presenting a file chooser dialog to the user.

Link copied to clipboard
open fun saveFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.FileDialog.save call and returns the resulting file.

Link copied to clipboard
open fun selectFolder(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function initiates a directory selection operation by presenting a file chooser dialog to the user.

Link copied to clipboard
open fun selectFolderFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.FileDialog.select_folder call and returns the resulting file.

Link copied to clipboard
open fun selectMultipleFolders(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function initiates a multi-directory selection operation by presenting a file chooser dialog to the user.

Link copied to clipboard
open fun selectMultipleFoldersFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.FileDialog.select_multiple_folders call and returns the resulting files in a GListModel.