Trait gtk::prelude::RecentChooserExt[][src]

pub trait RecentChooserExt: 'static {
Show 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

Required methods

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

Gets the RecentInfo currently selected by self.

Returns

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

Gets the URI currently selected by self.

Returns

a newly allocated string holding a URI.

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

Returns

a RecentFilter object.

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().

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

Returns

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

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.

Gets whether self can select multiple items.

Returns

true if self can select more than one item.

Retrieves whether self should show an icon near the resource.

Returns

true if the icons should be displayed, false otherwise.

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.

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

Returns

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

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.

Gets the value set by set_sort_type().

Returns

the sorting order of the self.

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.

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().

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

filter

a RecentFilter

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

Selects uri inside self.

uri

a URI

Returns

true if uri was found.

Sets uri as the current URI for self.

uri

a URI

Returns

true if the URI was found.

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

filter

a RecentFilter

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

limit

a positive integer, or -1 for all items

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

Sets whether self can select multiple items.

select_multiple

true if self can select more than one item

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

show_icons

whether to show an icon near the resource

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

Whether to show recently used resources marked registered as private.

show_private

true to show private items, false otherwise

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

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

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

sort_type

sort order that the chooser should use

Unselects all the items inside self.

Unselects uri inside self.

uri

a URI

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.

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.

Implementors