pub struct FileChooserNative { /* private fields */ }Expand description
FileChooserNative is an abstraction of a dialog box suitable
for use with “File/Open” or “File/Save as” commands. By default, this
just uses a FileChooserDialog to implement the actual dialog.
However, on certain platforms, such as Windows and macOS, the native platform
file chooser is used instead. When the application is running in a
sandboxed environment without direct filesystem access (such as Flatpak),
FileChooserNative may call the proper APIs (portals) to let the user
choose a file and make it available to the application.
While the API of FileChooserNative closely mirrors FileChooserDialog, the main
difference is that there is no access to any Window or Widget for the dialog.
This is required, as there may not be one in the case of a platform native dialog.
Showing, hiding and running the dialog is handled by the NativeDialog functions.
§Typical usage ## {gtkfilechoosernative-typical-usage}
In the simplest of cases, you can the following code to use
FileChooserDialog to select a file for opening:
GtkFileChooserNative *native;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
gint res;
native = gtk_file_chooser_native_new ("Open File",
parent_window,
action,
"_Open",
"_Cancel");
res = gtk_native_dialog_run (GTK_NATIVE_DIALOG (native));
if (res == GTK_RESPONSE_ACCEPT)
{
char *filename;
GtkFileChooser *chooser = GTK_FILE_CHOOSER (native);
filename = gtk_file_chooser_get_filename (chooser);
open_file (filename);
g_free (filename);
}
g_object_unref (native);To use a dialog for saving, you can use this:
GtkFileChooserNative *native;
GtkFileChooser *chooser;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
gint res;
native = gtk_file_chooser_native_new ("Save File",
parent_window,
action,
"_Save",
"_Cancel");
chooser = GTK_FILE_CHOOSER (native);
gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
if (user_edited_a_new_document)
gtk_file_chooser_set_current_name (chooser,
_("Untitled document"));
else
gtk_file_chooser_set_filename (chooser,
existing_filename);
res = gtk_native_dialog_run (GTK_NATIVE_DIALOG (native));
if (res == GTK_RESPONSE_ACCEPT)
{
char *filename;
filename = gtk_file_chooser_get_filename (chooser);
save_to_file (filename);
g_free (filename);
}
g_object_unref (native);For more information on how to best set up a file dialog, see FileChooserDialog.
§Response Codes ## {gtkfilechooserdialognative-responses}
FileChooserNative inherits from NativeDialog, which means it
will return ResponseType::Accept if the user accepted, and
ResponseType::Cancel if he pressed cancel. It can also return
ResponseType::DeleteEvent if the window was unexpectedly closed.
§Differences from FileChooserDialog ## {gtkfilechooserdialognative-differences}
There are a few things in the GtkFileChooser API that are not
possible to use with FileChooserNative, as such use would
prohibit the use of a native dialog.
There is no support for the signals that are emitted when the user navigates in the dialog, including:
You can also not use the methods that directly control user navigation:
If you need any of the above you will have to use FileChooserDialog directly.
No operations that change the the dialog work while the dialog is visible. Set all the properties that are required before showing the dialog.
§Win32 details ## {gtkfilechooserdialognative-win32}
On windows the IFileDialog implementation (added in Windows Vista) is
used. It supports many of the features that FileChooserDialog
does, but there are some things it does not handle:
-
Extra widgets added with
FileChooserExt::set_extra_widget(). -
Use of custom previews by connecting to
update-preview. -
Any
FileFilteradded using a mimetype or custom filter.
If any of these features are used the regular FileChooserDialog
will be used in place of the native one.
§Portal details ## {gtkfilechooserdialognative-portal}
When the org.freedesktop.portal.FileChooser portal is available on the session bus, it is used to bring up an out-of-process file chooser. Depending on the kind of session the application is running in, this may or may not be a GTK+ file chooser. In this situation, the following things are not supported and will be silently ignored:
-
Extra widgets added with
FileChooserExt::set_extra_widget(). -
Use of custom previews by connecting to
update-preview. -
Any
FileFilteradded with a custom filter.
§macOS details ## {gtkfilechooserdialognative-macos}
On macOS the NSSavePanel and NSOpenPanel classes are used to provide native
file chooser dialogs. Some features provided by FileChooserDialog are
not supported:
-
Extra widgets added with
FileChooserExt::set_extra_widget(), unless the widget is an instance of GtkLabel, in which case the label text will be used to set the NSSavePanel message instance property. -
Use of custom previews by connecting to
update-preview. -
Any
FileFilteradded with a custom filter. -
Shortcut folders.
§Properties
§accept-label
The text used for the label on the accept button in the dialog, or
None to use the default text.
Readable | Writeable
§cancel-label
The text used for the label on the cancel button in the dialog, or
None to use the default text.
Readable | Writeable
NativeDialog
§modal
Whether the window should be modal with respect to its transient parent.
Readable | Writeable
§title
The title of the dialog window
Readable | Writeable
§transient-for
The transient parent of the dialog, or None for none.
Readable | Writeable | Construct
§visible
Whether the window is currenlty visible.
Readable | Writeable
FileChooser
§action
Readable | Writeable
§create-folders
Whether a file chooser not in FileChooserAction::Open mode
will offer the user to create new folders.
Readable | Writeable
§do-overwrite-confirmation
Whether a file chooser in FileChooserAction::Save mode
will present an overwrite confirmation dialog if the user
selects a file name that already exists.
Readable | Writeable
§extra-widget
Readable | Writeable
§filter
Readable | Writeable
§local-only
Readable | Writeable
§preview-widget
Readable | Writeable
§preview-widget-active
Readable | Writeable
§select-multiple
Readable | Writeable
§show-hidden
Readable | Writeable
§use-preview-label
Readable | Writeable
§Implements
NativeDialogExt, glib::ObjectExt, FileChooserExt, NativeDialogExtManual, FileChooserExtManual
Implementations§
Source§impl FileChooserNative
impl FileChooserNative
Sourcepub fn new(
title: Option<&str>,
parent: Option<&impl IsA<Window>>,
action: FileChooserAction,
accept_label: Option<&str>,
cancel_label: Option<&str>,
) -> FileChooserNative
pub fn new( title: Option<&str>, parent: Option<&impl IsA<Window>>, action: FileChooserAction, accept_label: Option<&str>, cancel_label: Option<&str>, ) -> FileChooserNative
Creates a new FileChooserNative.
§title
Title of the native, or None
§parent
Transient parent of the native, or None
§action
Open or save mode for the dialog
§accept_label
text to go in the accept button, or None for the default
§cancel_label
text to go in the cancel button, or None for the default
§Returns
a new FileChooserNative
Sourcepub fn builder() -> FileChooserNativeBuilder
pub fn builder() -> FileChooserNativeBuilder
Creates a new builder-pattern struct instance to construct FileChooserNative objects.
This method returns an instance of FileChooserNativeBuilder which can be used to create FileChooserNative objects.
Sourcepub fn accept_label(&self) -> Option<GString>
pub fn accept_label(&self) -> Option<GString>
Sourcepub fn cancel_label(&self) -> Option<GString>
pub fn cancel_label(&self) -> Option<GString>
Sourcepub fn set_accept_label(&self, accept_label: Option<&str>)
pub fn set_accept_label(&self, accept_label: Option<&str>)
Sets the custom label text for the accept button.
If characters in label are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use “__” (two
underscores). The first underlined character represents a keyboard
accelerator called a mnemonic.
Pressing Alt and that key activates the button.
§accept_label
custom label or None for the default
Sourcepub fn set_cancel_label(&self, cancel_label: Option<&str>)
pub fn set_cancel_label(&self, cancel_label: Option<&str>)
Sets the custom label text for the cancel button.
If characters in label are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use “__” (two
underscores). The first underlined character represents a keyboard
accelerator called a mnemonic.
Pressing Alt and that key activates the button.
§cancel_label
custom label or None for the default
pub fn connect_accept_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_cancel_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Trait Implementations§
Source§impl Clone for FileChooserNative
impl Clone for FileChooserNative
Source§impl Debug for FileChooserNative
impl Debug for FileChooserNative
Source§impl Default for FileChooserNative
impl Default for FileChooserNative
Source§impl Display for FileChooserNative
impl Display for FileChooserNative
impl Eq for FileChooserNative
Source§impl HasParamSpec for FileChooserNative
impl HasParamSpec for FileChooserNative
type ParamSpec = ParamSpecObject
Source§type SetValue = FileChooserNative
type SetValue = FileChooserNative
type BuilderFn = fn(&str) -> ParamSpecObjectBuilder<'_, FileChooserNative>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for FileChooserNative
impl Hash for FileChooserNative
impl IsA<FileChooser> for FileChooserNative
impl IsA<NativeDialog> for FileChooserNative
Source§impl Ord for FileChooserNative
impl Ord for FileChooserNative
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParentClassIs for FileChooserNative
impl ParentClassIs for FileChooserNative
type Parent = NativeDialog
Source§impl<OT: ObjectType> PartialEq<OT> for FileChooserNative
impl<OT: ObjectType> PartialEq<OT> for FileChooserNative
Source§impl<OT: ObjectType> PartialOrd<OT> for FileChooserNative
impl<OT: ObjectType> PartialOrd<OT> for FileChooserNative
Source§impl StaticType for FileChooserNative
impl StaticType for FileChooserNative
Source§fn static_type() -> Type
fn static_type() -> Type
Self.Auto Trait Implementations§
impl !Send for FileChooserNative
impl !Sync for FileChooserNative
impl Freeze for FileChooserNative
impl RefUnwindSafe for FileChooserNative
impl Unpin for FileChooserNative
impl UnsafeUnpin for FileChooserNative
impl UnwindSafe for FileChooserNative
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast will do many checks at compile-time already. downcast will
perform the same checks at runtime as dynamic_cast, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<O> FileChooserExt for Owhere
O: IsA<FileChooser>,
impl<O> FileChooserExt for Owhere
O: IsA<FileChooser>,
Source§fn add_filter(&self, filter: FileFilter)
fn add_filter(&self, filter: FileFilter)
filter to the list of filters that the user can select between.
When a filter is selected, only files that are passed by that
filter are displayed. Read moreSource§fn add_shortcut_folder(&self, folder: impl AsRef<Path>) -> Result<(), Error>
fn add_shortcut_folder(&self, folder: impl AsRef<Path>) -> Result<(), Error>
Source§fn add_shortcut_folder_uri(&self, uri: &str) -> Result<(), Error>
fn add_shortcut_folder_uri(&self, uri: &str) -> Result<(), Error>
Source§fn action(&self) -> FileChooserAction
fn action(&self) -> FileChooserAction
set_action(). Read moreSource§fn choice(&self, id: &str) -> Option<GString>
fn choice(&self, id: &str) -> Option<GString>
Source§fn creates_folders(&self) -> bool
fn creates_folders(&self) -> bool
set_create_folders(). Read moreSource§fn current_folder(&self) -> Option<PathBuf>
fn current_folder(&self) -> Option<PathBuf>
Source§fn current_folder_file(&self) -> Option<File>
fn current_folder_file(&self) -> Option<File>
Source§fn current_folder_uri(&self) -> Option<GString>
fn current_folder_uri(&self) -> Option<GString>
Source§fn current_name(&self) -> Option<GString>
fn current_name(&self) -> Option<GString>
Source§fn does_overwrite_confirmation(&self) -> bool
fn does_overwrite_confirmation(&self) -> bool
Source§fn extra_widget(&self) -> Option<Widget>
fn extra_widget(&self) -> Option<Widget>
set_extra_widget(). Read moreSource§fn filename(&self) -> Option<PathBuf>
fn filename(&self) -> Option<PathBuf>
Source§fn filter(&self) -> Option<FileFilter>
fn filter(&self) -> Option<FileFilter>
set_filter(). Read moreSource§fn is_local_only(&self) -> bool
fn is_local_only(&self) -> bool
set_local_only() Read moreSource§fn preview_file(&self) -> Option<File>
fn preview_file(&self) -> Option<File>
gio::File that should be previewed in a custom preview
Internal function, see preview_uri(). Read moreSource§fn preview_filename(&self) -> Option<PathBuf>
fn preview_filename(&self) -> Option<PathBuf>
set_preview_widget(). Read moreSource§fn preview_uri(&self) -> Option<GString>
fn preview_uri(&self) -> Option<GString>
set_preview_widget(). Read moreSource§fn preview_widget(&self) -> Option<Widget>
fn preview_widget(&self) -> Option<Widget>
set_preview_widget(). Read moreSource§fn is_preview_widget_active(&self) -> bool
fn is_preview_widget_active(&self) -> bool
set_preview_widget()
should be shown for the current filename. See
set_preview_widget_active(). Read moreSource§fn selects_multiple(&self) -> bool
fn selects_multiple(&self) -> bool
set_select_multiple(). Read moreset_show_hidden(). Read moreSource§fn uri(&self) -> Option<GString>
fn uri(&self) -> Option<GString>
Source§fn uris(&self) -> Vec<GString>
fn uris(&self) -> Vec<GString>
self. The returned names are full absolute URIs. Read moreSource§fn uses_preview_label(&self) -> bool
fn uses_preview_label(&self) -> bool
set_use_preview_label(). Read moreSource§fn list_filters(&self) -> Vec<FileFilter>
fn list_filters(&self) -> Vec<FileFilter>
Source§fn list_shortcut_folder_uris(&self) -> Vec<GString>
fn list_shortcut_folder_uris(&self) -> Vec<GString>
add_shortcut_folder_uri(). Read moreSource§fn list_shortcut_folders(&self) -> Vec<PathBuf>
fn list_shortcut_folders(&self) -> Vec<PathBuf>
add_shortcut_folder(). Read moreSource§fn remove_choice(&self, id: &str)
fn remove_choice(&self, id: &str)
FileChooserExtManual::add_choice()][crate::prelude::FileChooserExtManual::add_choice()]. Read moreSource§fn remove_filter(&self, filter: &FileFilter)
fn remove_filter(&self, filter: &FileFilter)
filter from the list of filters that the user can select between. Read moreSource§fn remove_shortcut_folder(&self, folder: impl AsRef<Path>) -> Result<(), Error>
fn remove_shortcut_folder(&self, folder: impl AsRef<Path>) -> Result<(), Error>
Source§fn remove_shortcut_folder_uri(&self, uri: &str) -> Result<(), Error>
fn remove_shortcut_folder_uri(&self, uri: &str) -> Result<(), Error>
Source§fn select_all(&self)
fn select_all(&self)
Source§fn select_file(&self, file: &impl IsA<File>) -> Result<(), Error>
fn select_file(&self, file: &impl IsA<File>) -> Result<(), Error>
file. An internal function. See
_gtk_file_chooser_select_uri(). Read moreSource§fn select_filename(&self, filename: impl AsRef<Path>) -> bool
fn select_filename(&self, filename: impl AsRef<Path>) -> bool
self, then the current folder of self will
be changed to the folder containing filename. Read moreSource§fn select_uri(&self, uri: &str) -> bool
fn select_uri(&self, uri: &str) -> bool
uri. If the URI doesn’t refer to a
file in the current folder of self, then the current folder of
self will be changed to the folder containing filename. Read moreSource§fn set_action(&self, action: FileChooserAction)
fn set_action(&self, action: FileChooserAction)
FileChooserAction::Save but not if the action is
FileChooserAction::Open. Read moreSource§fn set_choice(&self, id: &str, option: &str)
fn set_choice(&self, id: &str, option: &str)
FileChooserExtManual::add_choice()][crate::prelude::FileChooserExtManual::add_choice()]. For a boolean choice, the
possible options are “true” and “false”. Read moreSource§fn set_create_folders(&self, create_folders: bool)
fn set_create_folders(&self, create_folders: bool)
FileChooserAction::Open. Read moreSource§fn set_current_folder(&self, filename: impl AsRef<Path>) -> bool
fn set_current_folder(&self, filename: impl AsRef<Path>) -> bool
self from a local filename.
The user will be shown the full contents of the current folder,
plus user interface elements for navigating to other folders. Read moreSource§fn set_current_folder_file(&self, file: &impl IsA<File>) -> Result<(), Error>
fn set_current_folder_file(&self, file: &impl IsA<File>) -> Result<(), Error>
self from a gio::File.
Internal function, see set_current_folder_uri(). Read moreSource§fn set_current_folder_uri(&self, uri: &str) -> bool
fn set_current_folder_uri(&self, uri: &str) -> bool
self from an URI.
The user will be shown the full contents of the current folder,
plus user interface elements for navigating to other folders. Read moreSource§fn set_current_name(&self, name: &str)
fn set_current_name(&self, name: &str)
name. Read moreSource§fn set_do_overwrite_confirmation(&self, do_overwrite_confirmation: bool)
fn set_do_overwrite_confirmation(&self, do_overwrite_confirmation: bool)
FileChooserAction::Save mode will present
a confirmation dialog if the user types a file name that already exists. This
is false by default. Read moreSource§fn set_extra_widget(&self, extra_widget: &impl IsA<Widget>)
fn set_extra_widget(&self, extra_widget: &impl IsA<Widget>)
Source§fn set_file(&self, file: &impl IsA<File>) -> Result<(), Error>
fn set_file(&self, file: &impl IsA<File>) -> Result<(), Error>
file as the current filename for the file chooser, by changing
to the file’s parent folder and actually selecting the file in list. If
the self is in FileChooserAction::Save mode, the file’s base name
will also appear in the dialog’s file name entry. Read moreSource§fn set_filename(&self, filename: impl AsRef<Path>) -> bool
fn set_filename(&self, filename: impl AsRef<Path>) -> bool
filename as the current filename for the file chooser, by changing to
the file’s parent folder and actually selecting the file in list; all other
files will be unselected. If the self is in
FileChooserAction::Save mode, the file’s base name will also appear in
the dialog’s file name entry. Read moreSource§fn set_filter(&self, filter: &FileFilter)
fn set_filter(&self, filter: &FileFilter)
Source§fn set_local_only(&self, local_only: bool)
fn set_local_only(&self, local_only: bool)
local_only is true (the default),
then the selected file or files are guaranteed to be
accessible through the operating systems native file
system and therefore the application only
needs to worry about the filename functions in
FileChooser, like filename(),
rather than the URI functions like
uri(), Read moreSource§fn set_preview_widget(&self, preview_widget: &impl IsA<Widget>)
fn set_preview_widget(&self, preview_widget: &impl IsA<Widget>)
update-preview
signal, and call preview_filename() or
preview_uri() on each change. If you can
display a preview of the new file, update your widget and
set the preview active using set_preview_widget_active().
Otherwise, set the preview inactive. Read moreSource§fn set_preview_widget_active(&self, active: bool)
fn set_preview_widget_active(&self, active: bool)
set_preview_widget() should be shown for the
current filename. When active is set to false, the file chooser
may display an internally generated preview of the current file
or it may display no preview at all. See
set_preview_widget() for more details. Read moreSource§fn set_select_multiple(&self, select_multiple: bool)
fn set_select_multiple(&self, select_multiple: bool)
FileChooserAction::Open or
FileChooserAction::SelectFolder. Read moreSource§fn set_uri(&self, uri: &str) -> bool
fn set_uri(&self, uri: &str) -> bool
uri as the current file for the file chooser,
by changing to the URI’s parent folder and actually selecting the URI in the
list. If the self is FileChooserAction::Save mode, the URI’s base
name will also appear in the dialog’s file name entry. Read moreSource§fn set_use_preview_label(&self, use_label: bool)
fn set_use_preview_label(&self, use_label: bool)
Source§fn unselect_all(&self)
fn unselect_all(&self)
Source§fn unselect_file(&self, file: &impl IsA<File>)
fn unselect_file(&self, file: &impl IsA<File>)
file. If the file is not in the current
directory, does not exist, or is otherwise not currently selected, does nothing. Read moreSource§fn unselect_filename(&self, filename: impl AsRef<Path>)
fn unselect_filename(&self, filename: impl AsRef<Path>)
Source§fn unselect_uri(&self, uri: &str)
fn unselect_uri(&self, uri: &str)
uri. If the file
is not in the current directory, does not exist, or
is otherwise not currently selected, does nothing. Read moreSource§fn connect_confirm_overwrite<F: Fn(&Self) -> FileChooserConfirmation + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_confirm_overwrite<F: Fn(&Self) -> FileChooserConfirmation + 'static>( &self, f: F, ) -> SignalHandlerId
FileChooserAction::Save mode. Read moreSource§fn connect_current_folder_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_current_folder_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
FileChooser
changes. This can happen due to the user performing some action that
changes folders, such as selecting a bookmark or visiting a folder on the
file list. It can also happen as a result of calling a function to
explicitly change the current folder in a file chooser. Read moreSource§fn connect_file_activated<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_file_activated<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Enter. Read moreSource§fn connect_selection_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_selection_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
FileChooser. This can happen when the user modifies the selection
with the mouse or the keyboard, or when explicitly calling functions to
change the selection. Read moreSource§fn connect_update_preview<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_update_preview<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_action_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_create_folders_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_do_overwrite_confirmation_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_extra_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_local_only_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_preview_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_preview_widget_active_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_select_multiple_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_use_preview_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
impl<O> FileChooserExtManual for Owhere
O: IsA<FileChooser>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
impl<'a, T, C, E> FromValueOptional<'a> for Twhere
T: FromValue<'a, Checker = C>,
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>,
E: Error + Send + 'static,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
impl<Super, Sub> MayDowncastTo<Sub> for Super
Source§impl<O> NativeDialogExt for Owhere
O: IsA<NativeDialog>,
impl<O> NativeDialogExt for Owhere
O: IsA<NativeDialog>,
fn destroy(&self)
Source§fn transient_for(&self) -> Option<Window>
fn transient_for(&self) -> Option<Window>
set_transient_for(). Read moreSource§fn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Source§fn run(&self) -> ResponseType
fn run(&self) -> ResponseType
Source§fn set_modal(&self, modal: bool)
fn set_modal(&self, modal: bool)
set_transient_for() to make the dialog transient for the
parent; most [window managers][gtk-X11-arch]
will then disallow lowering the dialog below the parent. Read moreSource§fn set_transient_for(&self, parent: Option<&impl IsA<Window>>)
fn set_transient_for(&self, parent: Option<&impl IsA<Window>>)
Source§fn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
Source§fn connect_response<F: Fn(&Self, ResponseType) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_response<F: Fn(&Self, ResponseType) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_modal_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_transient_for_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Source§impl<O> NativeDialogExtManual for Owhere
O: IsA<NativeDialog>,
impl<O> NativeDialogExtManual for Owhere
O: IsA<NativeDialog>,
Source§fn run_future<'a>(&'a self) -> Pin<Box<dyn Future<Output = ResponseType> + 'a>>
fn run_future<'a>(&'a self) -> Pin<Box<dyn Future<Output = ResponseType> + 'a>>
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moreSource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify signal of the object. Read more