Trait gtk::prelude::RecentChooserExt  
source · [−]pub trait RecentChooserExt: 'static {
Show 42 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
Trait containing all RecentChooser methods.
Implementors
RecentChooserDialog, RecentChooserMenu, RecentChooserWidget, RecentChooser
Required Methods
sourcefn add_filter(&self, filter: &RecentFilter)
 
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
sourcefn current_item(&self) -> Option<RecentInfo>
 
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.
sourcefn current_uri(&self) -> Option<GString>
 
fn current_uri(&self) -> Option<GString>
sourcefn filter(&self) -> Option<RecentFilter>
 
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.
sourcefn items(&self) -> Vec<RecentInfo>
 
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().
sourcefn is_local_only(&self) -> bool
 
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.
sourcefn selects_multiple(&self) -> bool
 
fn selects_multiple(&self) -> bool
sourcefn shows_icons(&self) -> bool
 
fn shows_icons(&self) -> bool
sourcefn shows_not_found(&self) -> bool
 
fn shows_not_found(&self) -> bool
sourcefn shows_private(&self) -> bool
 
fn shows_private(&self) -> bool
sourcefn shows_tips(&self) -> bool
 
fn shows_tips(&self) -> bool
sourcefn sort_type(&self) -> RecentSortType
 
fn sort_type(&self) -> RecentSortType
sourcefn list_filters(&self) -> Vec<RecentFilter>
 
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().
sourcefn remove_filter(&self, filter: &RecentFilter)
 
fn remove_filter(&self, filter: &RecentFilter)
sourcefn select_all(&self)
 
fn select_all(&self)
Selects all the items inside self, if the self supports
multiple selection.
sourcefn set_filter(&self, filter: Option<&RecentFilter>)
 
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
sourcefn set_local_only(&self, local_only: bool)
 
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
sourcefn set_select_multiple(&self, select_multiple: bool)
 
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
sourcefn set_show_icons(&self, show_icons: bool)
 
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
sourcefn set_show_not_found(&self, show_not_found: bool)
 
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
sourcefn set_show_private(&self, show_private: bool)
 
fn set_show_private(&self, show_private: bool)
Whether to show recently used resources marked registered as private.
show_private
sourcefn set_show_tips(&self, show_tips: bool)
 
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
sourcefn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(
    &self,
    sort_func: P
)
 
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
sourcefn set_sort_type(&self, sort_type: RecentSortType)
 
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
sourcefn unselect_all(&self)
 
fn unselect_all(&self)
Unselects all the items inside self.
sourcefn unselect_uri(&self, uri: &str)
 
fn unselect_uri(&self, uri: &str)
sourcefn connect_item_activated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
 
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.
sourcefn connect_selection_changed<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
 
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.