Skip to main content

RecentChooserExt

Trait RecentChooserExt 

Source
pub trait RecentChooserExt: IsA<RecentChooser> + 'static {
Show 42 methods // Provided methods fn add_filter(&self, filter: &RecentFilter) { ... } fn current_item(&self) -> Option<RecentInfo> { ... } fn current_uri(&self) -> Option<GString> { ... } fn filter(&self) -> Option<RecentFilter> { ... } fn items(&self) -> Vec<RecentInfo> { ... } fn limit(&self) -> i32 { ... } fn is_local_only(&self) -> bool { ... } fn selects_multiple(&self) -> bool { ... } fn shows_icons(&self) -> bool { ... } fn shows_not_found(&self) -> bool { ... } fn shows_private(&self) -> bool { ... } fn shows_tips(&self) -> bool { ... } fn sort_type(&self) -> RecentSortType { ... } fn uris(&self) -> Vec<GString> { ... } fn list_filters(&self) -> Vec<RecentFilter> { ... } fn remove_filter(&self, filter: &RecentFilter) { ... } fn select_all(&self) { ... } fn select_uri(&self, uri: &str) -> Result<(), Error> { ... } fn set_current_uri(&self, uri: &str) -> Result<(), Error> { ... } fn set_filter(&self, filter: Option<&RecentFilter>) { ... } fn set_limit(&self, limit: i32) { ... } fn set_local_only(&self, local_only: bool) { ... } fn set_select_multiple(&self, select_multiple: bool) { ... } fn set_show_icons(&self, show_icons: bool) { ... } fn set_show_not_found(&self, show_not_found: bool) { ... } fn set_show_private(&self, show_private: bool) { ... } fn set_show_tips(&self, show_tips: bool) { ... } fn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>( &self, sort_func: P, ) { ... } fn set_sort_type(&self, sort_type: RecentSortType) { ... } fn unselect_all(&self) { ... } fn unselect_uri(&self, uri: &str) { ... } fn connect_item_activated<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_selection_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_filter_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_limit_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_local_only_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_select_multiple_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_show_icons_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_show_not_found_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_show_private_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_show_tips_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_sort_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Provided Methods§

Source

fn add_filter(&self, filter: &RecentFilter)

Adds filter to the list of RecentFilter objects held by self.

If no previous filter objects were defined, this function will call set_filter().

§filter

a RecentFilter

Source

fn current_item(&self) -> Option<RecentInfo>

Gets the RecentInfo currently selected by self.

§Returns

a RecentInfo. Use gtk_recent_info_unref() when when you have finished using it.

Source

fn current_uri(&self) -> Option<GString>

Gets the URI currently selected by self.

§Returns

a newly allocated string holding a URI.

Source

fn filter(&self) -> Option<RecentFilter>

Gets the RecentFilter object currently used by self to affect the display of the recently used resources.

§Returns

a RecentFilter object.

Source

fn items(&self) -> Vec<RecentInfo>

Gets the list of recently used resources in form of RecentInfo objects.

The return value of this function is affected by the “sort-type” and “limit” properties of self.

§Returns

A newly allocated list of RecentInfo objects. You should use gtk_recent_info_unref() on every item of the list, and then free the list itself using g_list_free().

Source

fn limit(&self) -> i32

Gets the number of items returned by items() and uris().

§Returns

A positive integer, or -1 meaning that all items are returned.

Source

fn is_local_only(&self) -> bool

Gets whether only local resources should be shown in the recently used resources selector. See set_local_only()

§Returns

true if only local resources should be shown.

Source

fn selects_multiple(&self) -> bool

Gets whether self can select multiple items.

§Returns

true if self can select more than one item.

Source

fn shows_icons(&self) -> bool

Retrieves whether self should show an icon near the resource.

§Returns

true if the icons should be displayed, false otherwise.

Source

fn shows_not_found(&self) -> bool

Retrieves whether self should show the recently used resources that were not found.

§Returns

true if the resources not found should be displayed, and false otheriwse.

Source

fn shows_private(&self) -> bool

Returns whether self should display recently used resources registered as private.

§Returns

true if the recent chooser should show private items, false otherwise.

Source

fn shows_tips(&self) -> bool

Gets whether self should display tooltips containing the full path of a recently user resource.

§Returns

true if the recent chooser should show tooltips, false otherwise.

Source

fn sort_type(&self) -> RecentSortType

Gets the value set by set_sort_type().

§Returns

the sorting order of the self.

Source

fn uris(&self) -> Vec<GString>

Gets the URI of the recently used resources.

The return value of this function is affected by the “sort-type” and “limit” properties of self.

Since the returned array is None terminated, length may be None.

§Returns

A newly allocated, None-terminated array of strings. Use g_strfreev() to free it.

Source

fn list_filters(&self) -> Vec<RecentFilter>

Gets the RecentFilter objects held by self.

§Returns

A singly linked list of RecentFilter objects. You should just free the returned list using g_slist_free().

Source

fn remove_filter(&self, filter: &RecentFilter)

Removes filter from the list of RecentFilter objects held by self.

§filter

a RecentFilter

Source

fn select_all(&self)

Selects all the items inside self, if the self supports multiple selection.

Source

fn select_uri(&self, uri: &str) -> Result<(), Error>

Selects uri inside self.

§uri

a URI

§Returns

true if uri was found.

Source

fn set_current_uri(&self, uri: &str) -> Result<(), Error>

Sets uri as the current URI for self.

§uri

a URI

§Returns

true if the URI was found.

Source

fn set_filter(&self, filter: Option<&RecentFilter>)

Sets filter as the current RecentFilter object used by self to affect the displayed recently used resources.

§filter

a RecentFilter

Source

fn set_limit(&self, limit: i32)

Sets the number of items that should be returned by items() and uris().

§limit

a positive integer, or -1 for all items

Source

fn set_local_only(&self, local_only: bool)

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If local_only is true (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.

§local_only

true if only local files can be shown

Source

fn set_select_multiple(&self, select_multiple: bool)

Sets whether self can select multiple items.

§select_multiple

true if self can select more than one item

Source

fn set_show_icons(&self, show_icons: bool)

Sets whether self should show an icon near the resource when displaying it.

§show_icons

whether to show an icon near the resource

Source

fn set_show_not_found(&self, show_not_found: bool)

Sets whether self should display the recently used resources that it didn’t find. This only applies to local resources.

§show_not_found

whether to show the local items we didn’t find

Source

fn set_show_private(&self, show_private: bool)

Whether to show recently used resources marked registered as private.

§show_private

true to show private items, false otherwise

Source

fn set_show_tips(&self, show_tips: bool)

Sets whether to show a tooltips containing the full path of each recently used resource in a RecentChooser widget.

§show_tips

true if tooltips should be shown

Source

fn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>( &self, sort_func: P, )

Sets the comparison function used when sorting to be sort_func. If the self has the sort type set to RecentSortType::Custom then the chooser will sort using this function.

To the comparison function will be passed two RecentInfo structs and sort_data; sort_func should return a positive integer if the first item comes before the second, zero if the two items are equal and a negative integer if the first item comes after the second.

§sort_func

the comparison function

§sort_data

user data to pass to sort_func, or None

§data_destroy

destroy notifier for sort_data, or None

Source

fn set_sort_type(&self, sort_type: RecentSortType)

Changes the sorting order of the recently used resources list displayed by self.

§sort_type

sort order that the chooser should use

Source

fn unselect_all(&self)

Unselects all the items inside self.

Source

fn unselect_uri(&self, uri: &str)

Unselects uri inside self.

§uri

a URI

Source

fn connect_item_activated<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

This signal is emitted when the user “activates” a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.

Source

fn connect_selection_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

Source

fn connect_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_limit_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_local_only_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_select_multiple_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_show_icons_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_show_not_found_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_show_private_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_show_tips_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_sort_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§