FileDialog
Object Hierarchy:
Description:
[
CCode ( type_id =
"gtk_file_dialog_get_type ()" ) ]
[
Version ( since =
"4.10" ) ]
public class FileDialog :
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.
Content:
Properties:
Creation methods:
Methods:
- public unowned string? get_accept_label ()
Retrieves the text used by the dialog on its accept button.
- public unowned FileFilter? get_default_filter ()
Gets the filter that will be selected by default in the file chooser
dialog.
- public unowned ListModel? get_filters ()
Gets the filters that will be offered to the user in the file chooser
dialog.
- public unowned File? get_initial_file ()
Gets the file that will be initially selected in the file chooser
dialog.
- public unowned File? get_initial_folder ()
Gets the folder that will be set as the initial folder in the file
chooser dialog.
- public unowned string? get_initial_name ()
Gets the filename that will be initially selected.
- public bool get_modal ()
Returns whether the file chooser dialog blocks interaction with the
parent window while it is presented.
- public unowned string get_title ()
Returns the title that will be shown on the file chooser dialog.
- public async File open (Window? parent, Cancellable? cancellable) throws Error
Presents a file chooser dialog to the user.
- public async ListModel open_multiple (Window? parent, Cancellable? cancellable) throws Error
Presents a file chooser dialog to the user.
- public async ListModel open_multiple_text_files (Window? parent, Cancellable? cancellable, out unowned string encoding) throws Error
Presents a file chooser dialog to the user.
- public async File open_text_file (Window? parent, Cancellable? cancellable, out unowned string encoding) throws Error
Initiates a file selection operation by presenting a file chooser
dialog to the user.
- public async File save (Window? parent, Cancellable? cancellable) throws Error
Presents a file chooser dialog to the user.
- public async File save_text_file (Window? parent, Cancellable? cancellable, out unowned string encoding, out unowned string line_ending) throws Error
Initiates a file save operation by presenting a file chooser dialog to
the user.
- public async File select_folder (Window? parent, Cancellable? cancellable) throws Error
Presents a file chooser dialog to the user.
- public async ListModel select_multiple_folders (Window? parent, Cancellable? cancellable) throws Error
Presents a file chooser dialog to the user.
- public void set_accept_label (string? accept_label)
Sets the label shown on the file chooser's accept button.
- public void set_default_filter (FileFilter? filter)
Sets the filter that will be selected by default in the file chooser
dialog.
- public void set_filters (ListModel? filters)
Sets the filters that will be offered to the user in the file chooser
dialog.
- public void set_initial_file (File? file)
Sets the file that will be initially selected in the file chooser
dialog.
- public void set_initial_folder (File? folder)
Sets the folder that will be set as the initial folder in the file
chooser dialog.
- public void set_initial_name (string? name)
Sets the filename that will be initially selected.
- public void set_modal (bool modal)
Sets whether the file chooser dialog blocks interaction with the
parent window while it is presented.
- public void set_title (string title)
Sets the title that will be shown on the file chooser dialog.
Inherited Members:
All known members inherited from class GLib.Object