Class: Gtk::FileDialog
- Inherits:
-
Object
- Object
- Gtk::FileDialog
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#accept_label ⇒ String
Label for the file chooser's accept button.
-
#accept_label=(accept_label) ⇒ String
Label for the file chooser's accept button.
-
#default_filter ⇒ Gtk::FileFilter
The default filter.
-
#default_filter=(default_filter) ⇒ Gtk::FileFilter
The default filter.
-
#filters ⇒ Gio::ListModel
The list of filters.
-
#filters=(filters) ⇒ Gio::ListModel
The list of filters.
-
#initial_file ⇒ Gio::File
The initial file.
-
#initial_file=(initial_file) ⇒ Gio::File
The initial file.
-
#initial_folder ⇒ Gio::File
The initial folder.
-
#initial_folder=(initial_folder) ⇒ Gio::File
The initial folder.
-
#initial_name ⇒ String
The initial name.
-
#initial_name=(initial_name) ⇒ String
The initial name.
-
#initialize ⇒ Gtk::FileDialog
constructor
Creates a new
GtkFileDialogobject. -
#modal ⇒ Boolean
Returns whether the file chooser dialog blocks interaction with the parent window while it is presented.
-
#modal=(modal) ⇒ Boolean
Whether the file chooser dialog is modal.
-
#modal? ⇒ Boolean
Whether the file chooser dialog is modal.
-
#open(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#open_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.open] call.
-
#open_multiple(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#open_multiple_finish(result) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.open] call.
-
#open_multiple_text_files(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#open_multiple_text_files_finish(result, encoding) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.open] call.
-
#open_text_file(parent, cancellable, callback, user_data) ⇒ nil
Initiates a file selection operation by presenting a file chooser dialog to the user.
-
#open_text_file_finish(result, encoding) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.open_text_file] call and returns the resulting file and text encoding.
-
#save(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#save_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.save] call.
-
#save_text_file(parent, cancellable, callback, user_data) ⇒ nil
Initiates a file save operation by presenting a file chooser dialog to the user.
-
#save_text_file_finish(result, encoding, line_ending) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.save_text_file] call and returns the resulting file, text encoding and line endings.
-
#select_folder(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#select_folder_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.select_folder] call.
-
#select_multiple_folders(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
-
#select_multiple_folders_finish(result) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.select_multiple_folders] call.
-
#title ⇒ String
A title that may be shown on the file chooser dialog.
-
#title=(title) ⇒ String
A title that may be shown on the file chooser dialog.
Constructor Details
#initialize ⇒ Gtk::FileDialog
Creates a new GtkFileDialog object.
Instance Method Details
#accept_label ⇒ String
Label for the file chooser's accept button.
#accept_label=(accept_label) ⇒ String
Label for the file chooser's accept button.
#default_filter ⇒ Gtk::FileFilter
The default filter.
This filter is initially active in the file chooser dialog.
If the default filter is NULL, the first filter of [propertyGtk.FileDialog:filters]
is used as the default filter. If that property contains no filter, the dialog will
be unfiltered.
If [propertyGtk.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.
#default_filter=(default_filter) ⇒ Gtk::FileFilter
The default filter.
This filter is initially active in the file chooser dialog.
If the default filter is NULL, the first filter of [propertyGtk.FileDialog:filters]
is used as the default filter. If that property contains no filter, the dialog will
be unfiltered.
If [propertyGtk.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.
#filters ⇒ Gio::ListModel
The list of filters.
See [propertyGtk.FileDialog:default-filter] about how these
two properties interact.
#filters=(filters) ⇒ Gio::ListModel
The list of filters.
See [propertyGtk.FileDialog:default-filter] about how these
two properties interact.
#initial_file ⇒ Gio::File
The initial file.
This file is initially selected in the file chooser dialog
This is a utility property that sets both [propertyGtk.FileDialog:initial-folder]
and [propertyGtk.FileDialog:initial-name].
#initial_file=(initial_file) ⇒ Gio::File
The initial file.
This file is initially selected in the file chooser dialog
This is a utility property that sets both [propertyGtk.FileDialog:initial-folder]
and [propertyGtk.FileDialog:initial-name].
#initial_folder ⇒ Gio::File
The initial folder.
This is the directory that is initially opened in the file chooser dialog.
#initial_folder=(initial_folder) ⇒ Gio::File
The initial folder.
This is the directory that is initially opened in the file chooser dialog.
#initial_name ⇒ String
The initial name.
This is the name of the file that is initially selected in the file chooser dialog.
#initial_name=(initial_name) ⇒ String
The initial name.
This is the name of the file that is initially selected in the file chooser dialog.
#modal ⇒ Boolean
Returns whether the file chooser dialog blocks interaction
with the parent window while it is presented.
#modal=(modal) ⇒ Boolean
Whether the file chooser dialog is modal.
#modal? ⇒ Boolean
Whether the file chooser dialog is modal.
#open(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select a single file.
The callback will be called when the dialog is closed.
#open_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.open] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#open_multiple(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select multiple files.
The file chooser dialog will initially be opened in the directory
[propertyGtk.FileDialog:initial-folder].
The callback will be called when the dialog is closed.
#open_multiple_finish(result) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.open] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#open_multiple_text_files(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select multiple files.
The file chooser dialog will initially be opened in the directory
[propertyGtk.FileDialog:initial-folder].
In contrast to [methodGtk.FileDialog.open], this function
lets the user select the text encoding for the files, if possible.
The callback will be called when the dialog is closed.
#open_multiple_text_files_finish(result, encoding) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.open] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#open_text_file(parent, cancellable, callback, user_data) ⇒ nil
Initiates a file selection operation by presenting a file chooser
dialog to the user.
In contrast to [methodGtk.FileDialog.open], this function
lets the user select the text encoding for the file, if possible.
The callback will be called when the dialog is closed.
#open_text_file_finish(result, encoding) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.open_text_file] call
and returns the resulting file and text encoding.
If the user has explicitly selected a text encoding to use
for the file, then encoding will be set to a codeset name that
is suitable for passing to iconv_open(). Otherwise, it will
be NULL.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#save(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be save mode.
The callback will be called when the dialog is closed.
#save_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.save] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#save_text_file(parent, cancellable, callback, user_data) ⇒ nil
Initiates a file save operation by presenting a file chooser
dialog to the user.
In contrast to [methodGtk.FileDialog.save], this function
lets the user select the text encoding and line endings for
the text file, if possible.
The callback will be called when the dialog is closed.
#save_text_file_finish(result, encoding, line_ending) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.save_text_file] call
and returns the resulting file, text encoding and line endings.
If the user has explicitly selected a text encoding to use
for the file, then encoding will be set to a codeset name that
is suitable for passing to iconv_open(). Otherwise, it will
be NULL.
The line_ending will be set to one of "\n", "\r\n", "\r" or "",
where the latter means to preserve existing line endings.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#select_folder(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select a single folder.
If you pass initial_folder, the file chooser dialog will initially
be opened in the parent directory of that folder, otherwise, it
will be in the directory [propertyGtk.FileDialog:initial-folder].
The callback will be called when the dialog is closed.
#select_folder_finish(result) ⇒ Gio::File
Finishes the [methodGtk.FileDialog.select_folder] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#select_multiple_folders(parent, cancellable, callback, user_data) ⇒ nil
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to allow selecting
multiple folders.
The file chooser dialog will initially be opened in the
directory [propertyGtk.FileDialog:initial-folder].
The callback will be called when the dialog is closed.
#select_multiple_folders_finish(result) ⇒ Gio::ListModel
Finishes the [methodGtk.FileDialog.select_multiple_folders] call.
Note that this function returns a [errorGtk.DialogError.DISMISSED]
error if the user cancels the dialog.
#title ⇒ String
A title that may be shown on the file chooser dialog.
#title=(title) ⇒ String
A title that may be shown on the file chooser dialog.