[−][src]Trait gtk::RecentChooserExt
Trait containing all RecentChooser methods.
Implementors
RecentChooserDialog, RecentChooserMenu, RecentChooserWidget, RecentChooser
Required methods
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
RecentChooser::set_filter.
filter
a RecentFilter
fn get_current_item(&self) -> Option<RecentInfo>
Gets the RecentInfo currently selected by self.
Returns
a RecentInfo. Use RecentInfo::unref when
when you have finished using it.
fn get_current_uri(&self) -> Option<GString>
fn get_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.
fn get_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 RecentInfo::unref on every item of the list, and then free
the list itself using glib::List::free.
fn get_limit(&self) -> i32
Gets the number of items returned by RecentChooser::get_items
and RecentChooser::get_uris.
Returns
A positive integer, or -1 meaning that all items are returned.
fn get_local_only(&self) -> bool
Gets whether only local resources should be shown in the recently used
resources selector. See RecentChooser::set_local_only
Returns
true if only local resources should be shown.
fn get_select_multiple(&self) -> bool
fn get_show_icons(&self) -> bool
Retrieves whether self should show an icon near the resource.
Returns
true if the icons should be displayed, false otherwise.
fn get_show_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.
fn get_show_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.
fn get_show_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.
fn get_sort_type(&self) -> RecentSortType
fn get_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.
length
return location for a the length of the
URI list, or None
Returns
A newly allocated, None-terminated array of strings. Use
g_strfreev to free it.
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 glib::SList::free.
fn remove_filter(&self, filter: &RecentFilter)
fn select_all(&self)
Selects all the items inside self, if the self supports
multiple selection.
fn select_uri(&self, uri: &str) -> Result<(), Error>
fn set_current_uri(&self, uri: &str) -> Result<(), Error>
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
fn set_limit(&self, limit: i32)
Sets the number of items that should be returned by
RecentChooser::get_items and RecentChooser::get_uris.
limit
a positive integer, or -1 for all items
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
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
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
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
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
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
fn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(
&self,
sort_func: P
)
&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
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
fn unselect_all(&self)
Unselects all the items inside self.
fn unselect_uri(&self, uri: &str)
fn connect_item_activated<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&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.
fn connect_selection_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&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.
fn connect_property_filter_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_local_only_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_select_multiple_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_icons_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_not_found_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_private_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_tips_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_sort_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RecentChooser>> RecentChooserExt for O[src]
fn add_filter(&self, filter: &RecentFilter)[src]
fn get_current_item(&self) -> Option<RecentInfo>[src]
fn get_current_uri(&self) -> Option<GString>[src]
fn get_filter(&self) -> Option<RecentFilter>[src]
fn get_items(&self) -> Vec<RecentInfo>[src]
fn get_limit(&self) -> i32[src]
fn get_local_only(&self) -> bool[src]
fn get_select_multiple(&self) -> bool[src]
fn get_show_icons(&self) -> bool[src]
fn get_show_not_found(&self) -> bool[src]
fn get_show_private(&self) -> bool[src]
fn get_show_tips(&self) -> bool[src]
fn get_sort_type(&self) -> RecentSortType[src]
fn get_uris(&self) -> Vec<GString>[src]
fn list_filters(&self) -> Vec<RecentFilter>[src]
fn remove_filter(&self, filter: &RecentFilter)[src]
fn select_all(&self)[src]
fn select_uri(&self, uri: &str) -> Result<(), Error>[src]
fn set_current_uri(&self, uri: &str) -> Result<(), Error>[src]
fn set_filter(&self, filter: Option<&RecentFilter>)[src]
fn set_limit(&self, limit: i32)[src]
fn set_local_only(&self, local_only: bool)[src]
fn set_select_multiple(&self, select_multiple: bool)[src]
fn set_show_icons(&self, show_icons: bool)[src]
fn set_show_not_found(&self, show_not_found: bool)[src]
fn set_show_private(&self, show_private: bool)[src]
fn set_show_tips(&self, show_tips: bool)[src]
fn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(
&self,
sort_func: P
)[src]
&self,
sort_func: P
)
fn set_sort_type(&self, sort_type: RecentSortType)[src]
fn unselect_all(&self)[src]
fn unselect_uri(&self, uri: &str)[src]
fn connect_item_activated<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_filter_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_local_only_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_select_multiple_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_icons_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_not_found_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_private_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_tips_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_sort_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId