FileChooserImpl

data class FileChooserImpl(val gtkFileChooserPointer: <Error class: unknown class><<Error class: unknown class>>) : FileChooser

The FileChooserImpl type represents a native instance of the FileChooser interface.

Constructors

Link copied to clipboard
constructor(gtkFileChooserPointer: <Error class: unknown class><<Error class: unknown class>>)

Creates a new instance of FileChooser for the provided CPointer.

Properties

Link copied to clipboard

The type of operation that the file chooser is performing.

Link copied to clipboard

Whether a file chooser not in %GTK_FILE_CHOOSER_ACTION_OPEN mode will offer the user to create new folders.

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

A GListModel containing the filters that have been added with gtk_file_chooser_add_filter().

Link copied to clipboard
open override val gtkFileChooserPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether to allow multiple files to be selected.

Link copied to clipboard
open val shortcutFolders: <Error class: unknown class>

A GListModel containing the shortcut folders that have been added with gtk_file_chooser_add_shortcut_folder().

Functions

Link copied to clipboard
open fun addChoice(id: String, label: String, options: List<String>? = null, optionLabels: List<String>? = null)

Adds a 'choice' to the file chooser.

Link copied to clipboard
open fun addFilter(filter: FileFilter)

Adds @filter to the list of filters that the user can select between.

Link copied to clipboard
open fun addShortcutFolder(folder: <Error class: unknown class>): <Error class: unknown class><Boolean>

Adds a folder to be displayed with the shortcut folders in a file chooser.

Link copied to clipboard

Gets the type of operation that the file chooser is performing.

Link copied to clipboard
open fun getChoice(id: String): String?

Gets the currently selected option in the 'choice' with the given ID.

Link copied to clipboard

Gets whether file chooser will offer to create new folders.

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

Gets the current folder of @chooser as GFile.

Link copied to clipboard
open fun getCurrentName(): String?

Gets the current name in the file selector, as entered by the user.

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

Gets the GFile for the currently selected file in the file selector.

Link copied to clipboard
open fun getFiles(): <Error class: unknown class>

Lists all the selected files and subfolders in the current folder of @chooser as GFile.

Link copied to clipboard
open fun getFilter(): FileFilter?

Gets the current filter.

Link copied to clipboard
open fun getFilters(): <Error class: unknown class>

Gets the current set of user-selectable filters, as a list model.

Link copied to clipboard

Gets whether multiple files can be selected in the file chooser.

Link copied to clipboard
open fun getShortcutFolders(): <Error class: unknown class>

Queries the list of shortcut folders in the file chooser.

Link copied to clipboard
open fun removeChoice(id: String)

Removes a 'choice' that has been added with gtk_file_chooser_add_choice().

Link copied to clipboard
open fun removeFilter(filter: FileFilter)

Removes @filter from the list of filters that the user can select between.

Link copied to clipboard
open fun removeShortcutFolder(folder: <Error class: unknown class>): <Error class: unknown class><Boolean>

Removes a folder from the shortcut folders in a file chooser.

Link copied to clipboard
open fun setAction(action: FileChooserAction)

Sets the type of operation that the chooser is performing.

Link copied to clipboard
open fun setChoice(id: String, option: String)

Selects an option in a 'choice' that has been added with gtk_file_chooser_add_choice().

Link copied to clipboard
open fun setCreateFolders(createFolders: Boolean)

Sets whether file chooser will offer to create new folders.

Link copied to clipboard
open fun setCurrentFolder(file: <Error class: unknown class>? = null): <Error class: unknown class><Boolean>

Sets the current folder for @chooser from a GFile.

Link copied to clipboard
open fun setCurrentName(name: String)

Sets the current name in the file selector, as if entered by the user.

Link copied to clipboard
open fun setFile(file: <Error class: unknown class>): <Error class: unknown class><Boolean>

Sets @file as the current filename for the file chooser.

Link copied to clipboard
open fun setFilter(filter: FileFilter)

Sets the current filter.

Link copied to clipboard
open fun setSelectMultiple(selectMultiple: Boolean)

Sets whether multiple files can be selected in the file chooser.