Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FileDialogMeta

[575:14] static extends: object

Generated metadata helpers for FileDialog class surfaces.

Methods

  • properties ()

    Returns property metadata for FileDialog.

    • @r A list.

class: FileDialog

[15:7] extends: object

Asynchronous API to present a file chooser dialog. GtkFileDialog collects the arguments that are needed to present the 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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • FileDialog ()

    Creates a new GtkFileDialog object.

  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setAcceptlabel (string Value)

    Label for the file chooser's accept button.

    • @p Value is the new property value.
    • @r None.
  • setDefaultfilter (object Value)

    The default filter. This filter is initially active in the file chooser dialog. If the default filter is NULL, the first filter of [property@Gtk.FileDialog:filters] is used as the default filter. If that property contains no filter, the dialog will be unfiltered. If [property@Gtk.FileDialog:filters] is not NULL, the default filter should be part of the list. If it is not, the dialog may choose to not make it available.

    • @p Value is the new property value.
    • @r None.
  • setFilters (object Value)

    The list of filters. See [property@Gtk.FileDialog:default-filter] about how these two properties interact.

    • @p Value is the new property value.
    • @r None.
  • setInitialfile (object Value)

    The initial file. This file is initially selected in the file chooser dialog This is a utility property that sets both [property@Gtk.FileDialog:initial-folder] and [property@Gtk.FileDialog:initial-name].

    • @p Value is the new property value.
    • @r None.
  • setInitialfolder (object Value)

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

    • @p Value is the new property value.
    • @r None.
  • setInitialname (string Value)

    The initial name. This is the name of the file that is initially selected in the file chooser dialog.

    • @p Value is the new property value.
    • @r None.
  • setModal (bool Value)

    Whether the file chooser dialog is modal.

    • @p Value is the new property value.
    • @r None.
  • setTitle (string Value)

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

    • @p Value is the new property value.
    • @r None.
  • get_accept_label ()

    Retrieves the text used by the dialog on its accept button.

  • get_default_filter ()

    Gets the filter that will be selected by default in the file chooser dialog.

  • get_filters ()

    Gets the filters that will be offered to the user in the file chooser dialog.

  • get_initial_file ()

    Gets the file that will be initially selected in the file chooser dialog.

  • get_initial_folder ()

    Gets the folder that will be set as the initial folder in the file chooser dialog.

  • get_initial_name ()

    Gets the filename that will be initially selected.

  • get_modal ()

    Returns whether the file chooser dialog blocks interaction with the parent window while it is presented.

  • get_title ()

    Returns the title that will be shown on the file chooser dialog.

  • open_finish (object result)

    Finishes the [method@Gtk.FileDialog.open] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • open_multiple_finish (object result)

    Finishes the [method@Gtk.FileDialog.open] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • save_finish (object result)

    Finishes the [method@Gtk.FileDialog.save] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • select_folder_finish (object result)

    Finishes the [method@Gtk.FileDialog.select_folder] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • select_multiple_folders_finish (object result)

    Finishes the [method@Gtk.FileDialog.select_multiple_folders] call. Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • set_accept_label (string accept_label)

    Sets the label shown on the file chooser's accept button. Leaving the accept label unset or setting it as NULL will fall back to a default label, depending on what API is used to launch the file dialog.

    • @p accept_label is the new accept label.
    • @r None.
  • set_default_filter (object filter)

    Sets the filter that will be selected by default in the file chooser dialog. If set to NULL, the first item in [property@Gtk.FileDialog:filters] will be used as the default filter. If that list is empty, the dialog will be unfiltered.

    • @p filter is the file filter.
    • @r None.
  • set_filters (object filters)

    Sets the filters that will be offered to the user in the file chooser dialog.

    • @p filters is a list model of [class@Gtk.FileFilter].
    • @r None.
  • set_initial_file (object file)

    Sets the file that will be initially selected in the file chooser dialog. This function is a shortcut for calling both [method@Gtk.FileDialog.set_initial_folder] and [method@Gtk.FileDialog.set_initial_name] with the directory and name of

    • @file, respectively.
    • @p file is a file.
    • @r None.
  • set_initial_folder (object folder)

    Sets the folder that will be set as the initial folder in the file chooser dialog.

    • @p folder is a file.
    • @r None.
  • set_initial_name (string name)

    Sets the filename that will be initially selected. For save dialogs,

    • @name will usually be pre-entered into the name field. If a file with this name already exists in the directory set via [property@Gtk.FileDialog:initial-folder], the dialog will preselect it.
    • @p name is a string.
    • @r None.
  • set_modal (bool modal)

    Sets whether the file chooser dialog blocks interaction with the parent window while it is presented.

    • @p modal is the new value.
    • @r None.
  • set_title (string title)

    Sets the title that will be shown on the file chooser dialog.

    • @p title is the new title.
    • @r None.
  • filters ()

    Returns get_filters as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use get_filters() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • open_multiple_finish_list ()

    Returns open_multiple_finish as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use open_multiple_finish() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • open_multiple_text_files_finish_list ()

    Returns open_multiple_text_files_finish as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use open_multiple_text_files_finish() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • select_multiple_folders_finish_list ()

    Returns select_multiple_folders_finish as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use select_multiple_folders_finish() when lazy or change-notify access is required.

    • @r An Aussom list of elements.