Interface
GtkRecentChooser
Description [src]
interface Gtk.RecentChooser : GObject.Object
GtkRecentChooser
is an interface that can be implemented by widgets
displaying the list of recently used files. In GTK+, the main objects
that implement this interface are GtkRecentChooserWidget
,
GtkRecentChooserDialog
and GtkRecentChooserMenu
.
Recently used files are supported since GTK+ 2.10.
Prerequisite
In order to implement RecentChooser, your type must inherit fromGObject
.
Instance methods
gtk_recent_chooser_add_filter
Adds filter
to the list of GtkRecentFilter
objects held by chooser
.
since: 2.10
gtk_recent_chooser_get_current_item
Gets the GtkRecentInfo
currently selected by chooser
.
since: 2.10
gtk_recent_chooser_get_filter
Gets the GtkRecentFilter
object currently used by chooser
to affect
the display of the recently used resources.
since: 2.10
gtk_recent_chooser_get_items
Gets the list of recently used resources in form of GtkRecentInfo
objects.
since: 2.10
gtk_recent_chooser_get_limit
Gets the number of items returned by gtk_recent_chooser_get_items()
and gtk_recent_chooser_get_uris().
since: 2.10
gtk_recent_chooser_get_local_only
Gets whether only local resources should be shown in the recently used resources selector. See gtk_recent_chooser_set_local_only().
since: 2.10
gtk_recent_chooser_get_show_icons
Retrieves whether chooser
should show an icon near the resource.
since: 2.10
gtk_recent_chooser_get_show_not_found
Retrieves whether chooser
should show the recently used resources that
were not found.
since: 2.10
gtk_recent_chooser_get_show_private
Returns whether chooser
should display recently used resources
registered as private.
since: 2.10
gtk_recent_chooser_get_show_tips
Gets whether chooser
should display tooltips containing the full path
of a recently user resource.
since: 2.10
gtk_recent_chooser_get_sort_type
Gets the value set by gtk_recent_chooser_set_sort_type().
since: 2.10
gtk_recent_chooser_remove_filter
Removes filter
from the list of GtkRecentFilter
objects held by chooser
.
since: 2.10
gtk_recent_chooser_select_all
Selects all the items inside chooser
, if the chooser
supports
multiple selection.
since: 2.10
gtk_recent_chooser_set_filter
Sets filter
as the current GtkRecentFilter
object used by chooser
to affect the displayed recently used resources.
since: 2.10
gtk_recent_chooser_set_limit
Sets the number of items that should be returned by
gtk_recent_chooser_get_items()
and gtk_recent_chooser_get_uris().
since: 2.10
gtk_recent_chooser_set_local_only
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.
since: 2.10
gtk_recent_chooser_set_show_icons
Sets whether chooser
should show an icon near the resource when
displaying it.
since: 2.10
gtk_recent_chooser_set_show_not_found
Sets whether chooser
should display the recently used resources that
it didn’t find. This only applies to local resources.
since: 2.10
gtk_recent_chooser_set_show_private
Whether to show recently used resources marked registered as private.
since: 2.10
gtk_recent_chooser_set_show_tips
Sets whether to show a tooltips containing the full path of each
recently used resource in a GtkRecentChooser
widget.
since: 2.10
gtk_recent_chooser_set_sort_func
Sets the comparison function used when sorting to be sort_func
. If
the chooser
has the sort type set to #GTK_RECENT_SORT_CUSTOM then
the chooser will sort using this function.
since: 2.10
gtk_recent_chooser_set_sort_type
Changes the sorting order of the recently used resources list displayed by
chooser
.
since: 2.10
Properties
Gtk.RecentChooser:filter
The GtkRecentFilter
object to be used when displaying
the recently used resources.
since: 2.10
Gtk.RecentChooser:limit
The maximum number of recently used resources to be displayed, or -1 to display all items.
since: 2.10
Gtk.RecentChooser:local-only
Whether this GtkRecentChooser
should display only local (file:) resources.
since: 2.10
Gtk.RecentChooser:recent-manager
The GtkRecentManager
instance used by the GtkRecentChooser
to
display the list of recently used resources.
since: 2.10
Gtk.RecentChooser:show-icons
Whether this GtkRecentChooser
should display an icon near the item.
since: 2.10
Gtk.RecentChooser:show-not-found
Whether this GtkRecentChooser
should display the recently used resources
even if not present anymore. Setting this to FALSE
will perform a
potentially expensive check on every local resource (every remote
resource will always be displayed).
since: 2.10
Gtk.RecentChooser:show-tips
Whether this GtkRecentChooser
should display a tooltip containing the
full path of the recently used resources.
since: 2.10
Gtk.RecentChooser:sort-type
Sorting order to be used when displaying the recently used resources.
since: 2.10
Signals
Gtk.RecentChooser::item-activated
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
.
since: 2.10
Gtk.RecentChooser::selection-changed
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.
since: 2.10
Interface structure
struct GtkRecentChooserIface {
gboolean (* set_current_uri) (
GtkRecentChooser* chooser,
const gchar* uri,
GError** error
);
gchar* (* get_current_uri) (
GtkRecentChooser* chooser
);
gboolean (* select_uri) (
GtkRecentChooser* chooser,
const gchar* uri,
GError** error
);
void (* unselect_uri) (
GtkRecentChooser* chooser,
const gchar* uri
);
void (* select_all) (
GtkRecentChooser* chooser
);
void (* unselect_all) (
GtkRecentChooser* chooser
);
GList* (* get_items) (
GtkRecentChooser* chooser
);
GtkRecentManager* (* get_recent_manager) (
GtkRecentChooser* chooser
);
void (* add_filter) (
GtkRecentChooser* chooser,
GtkRecentFilter* filter
);
void (* remove_filter) (
GtkRecentChooser* chooser,
GtkRecentFilter* filter
);
GSList* (* list_filters) (
GtkRecentChooser* chooser
);
void (* set_sort_func) (
GtkRecentChooser* chooser,
GtkRecentSortFunc sort_func,
gpointer sort_data,
GDestroyNotify data_destroy
);
void (* item_activated) (
GtkRecentChooser* chooser
);
void (* selection_changed) (
GtkRecentChooser* chooser
);
}
No description available.
Interface members
set_current_uri |
|
Sets uri as the current URI for chooser. |
|
get_current_uri |
|
Gets the URI currently selected by chooser. |
|
select_uri |
|
Selects uri inside chooser. |
|
unselect_uri |
|
Unselects uri inside chooser. |
|
select_all |
|
Selects all the items inside chooser, if the chooser supports multiple selection. |
|
unselect_all |
|
Unselects all the items inside chooser. |
|
get_items |
|
Gets the list of recently used resources in form of
|
|
get_recent_manager |
|
Gets the |
|
add_filter |
|
Adds filter to the list of |
|
remove_filter |
|
Removes filter from the list of |
|
list_filters |
|
Gets the |
|
set_sort_func |
|
Sets the comparison function used when sorting to be sort_func. |
|
item_activated |
|
Signal emitted when the user “activates” a recent item in the recent chooser. |
|
selection_changed |
|
Signal emitted when there is a change in the set of selected recently used resources. |
Virtual methods
Gtk.RecentChooser.add_filter
Adds filter
to the list of GtkRecentFilter
objects held by chooser
.
since: 2.10
Gtk.RecentChooser.get_items
Gets the list of recently used resources in form of GtkRecentInfo
objects.
since: 2.10
Gtk.RecentChooser.item_activated
Signal emitted when the user “activates” a recent item in the recent chooser.
Gtk.RecentChooser.remove_filter
Removes filter
from the list of GtkRecentFilter
objects held by chooser
.
since: 2.10
Gtk.RecentChooser.select_all
Selects all the items inside chooser
, if the chooser
supports
multiple selection.
since: 2.10
Gtk.RecentChooser.selection_changed
Signal emitted when there is a change in the set of selected recently used resources.
Gtk.RecentChooser.set_sort_func
Sets the comparison function used when sorting to be sort_func
. If
the chooser
has the sort type set to #GTK_RECENT_SORT_CUSTOM then
the chooser will sort using this function.
since: 2.10