Gtk.Recent_Chooser.Gtk_Recent_Chooser 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 Gtk.Recent_Chooser_Widget.Gtk_Recent_Chooser_Widget, Gtk.Recent_Chooser_Dialog.Gtk_Recent_Chooser_Dialog and Gtk.Recent_Chooser_Menu.Gtk_Recent_Chooser_Menu.
Recently used files are supported since GTK+ 2.10.
function "+" (W : Gtk_Recent_Chooser) return Gtk_Recent_Chooser
procedure Add_Filter
(Chooser : Gtk_Recent_Chooser;
Filter : not null access Gtk.Recent_Filter.Gtk_Recent_Filter_Record'Class)
Adds Filter to the list of Gtk.Recent_Filter.Gtk_Recent_Filter objects held by Chooser. If no previous filter objects were defined, this function will call Gtk.Recent_Chooser.Set_Filter. Since: gtk+ 2.10
a Gtk.Recent_Filter.Gtk_Recent_Filter
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Recent_Chooser_Void is not null access procedure (Self : Gtk_Recent_Chooser);
Filter_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Recent_Filter.Gtk_Recent_Filter The Gtk.Recent_Filter.Gtk_Recent_Filter object to be used when displaying the recently used resources.
function Get_Current_Item
(Chooser : Gtk_Recent_Chooser) return Gtk.Recent_Info.Gtk_Recent_Info
Gets the Gtk.Recent_Info.Gtk_Recent_Info currently selected by Chooser. Since: gtk+ 2.10
a Gtk.Recent_Info.Gtk_Recent_Info. Use Gtk.Recent_Info.Unref when when you have finished using it.
function Get_Current_Uri
(Chooser : Gtk_Recent_Chooser) return UTF8_String
Gets the URI currently selected by Chooser. Since: gtk+ 2.10
a newly allocated string holding a URI.
function Get_Filter
(Chooser : Gtk_Recent_Chooser)
return Gtk.Recent_Filter.Gtk_Recent_Filter
Gets the Gtk.Recent_Filter.Gtk_Recent_Filter object currently used by Chooser to affect the display of the recently used resources. Since: gtk+ 2.10
a Gtk.Recent_Filter.Gtk_Recent_Filter object.
function Get_Items
(Chooser : Gtk_Recent_Chooser)
return Gtk.Recent_Manager.Gtk_Recent_Info_List.Glist
Gets the list of recently used resources in form of Gtk.Recent_Info.Gtk_Recent_Info objects. The return value of this function is affected by the "sort-type" and "limit" properties of Chooser. Since: gtk+ 2.10
function Get_Limit (Chooser : Gtk_Recent_Chooser) return Glib.Gint
Gets the number of items returned by Gtk.Recent_Chooser.Get_Items and gtk_recent_chooser_get_uris. Since: gtk+ 2.10
A positive integer, or -1 meaning that all items are returned.
function Get_Local_Only (Chooser : Gtk_Recent_Chooser) return Boolean
Gets whether only local resources should be shown in the recently used resources selector. See Gtk.Recent_Chooser.Set_Local_Only Since: gtk+ 2.10
True if only local resources should be shown.
function Get_Select_Multiple
(Chooser : Gtk_Recent_Chooser) return Boolean
Gets whether Chooser can select multiple items. Since: gtk+ 2.10
True if Chooser can select more than one item.
function Get_Show_Icons (Chooser : Gtk_Recent_Chooser) return Boolean
Retrieves whether Chooser should show an icon near the resource. Since: gtk+ 2.10
True if the icons should be displayed, False otherwise.
function Get_Show_Not_Found (Chooser : Gtk_Recent_Chooser) return Boolean
Retrieves whether Chooser should show the recently used resources that were not found. Since: gtk+ 2.10
True if the resources not found should be displayed, and False otheriwse.
function Get_Show_Private (Chooser : Gtk_Recent_Chooser) return Boolean
Returns whether Chooser should display recently used resources registered as private. Since: gtk+ 2.10
True if the recent chooser should show private items, False otherwise.
function Get_Show_Tips (Chooser : Gtk_Recent_Chooser) return Boolean
Gets whether Chooser should display tooltips containing the full path of a recently user resource. Since: gtk+ 2.10
True if the recent chooser should show tooltips, False otherwise.
function Get_Sort_Type
(Chooser : Gtk_Recent_Chooser) return Gtk_Recent_Sort_Type
Gets the value set by Gtk.Recent_Chooser.Set_Sort_Type. Since: gtk+ 2.10
the sorting order of the Chooser.
function Get_Type return Glib.GType
type Gtk_Recent_Chooser is new Glib.Types.GType_Interface;
type Gtk_Recent_Sort_Func is access function
(A : Gtk.Recent_Info.Gtk_Recent_Info;
B : Gtk.Recent_Info.Gtk_Recent_Info) return Glib.Gint;
type Gtk_Recent_Sort_Type is (
Recent_Sort_None,
Recent_Sort_Mru,
Recent_Sort_Lru,
Recent_Sort_Custom);
Used to specify the sorting method to be applyed to the recently used resource list.
package Gtk_Recent_Sort_Type_Properties is
new Generic_Internal_Discrete_Property (Gtk_Recent_Sort_Type);
Limit_Property : constant Glib.Properties.Property_Int;
The maximum number of recently used resources to be displayed, or -1 to display all items.
function List_Filters
(Chooser : Gtk_Recent_Chooser)
return Gtk.Recent_Filter.Gtk_Recent_Filter_List.GSlist
Gets the Gtk.Recent_Filter.Gtk_Recent_Filter objects held by Chooser. Since: gtk+ 2.10
Local_Only_Property : constant Glib.Properties.Property_Boolean;
Whether this Gtk.Recent_Chooser.Gtk_Recent_Chooser should display only local (file:) resources.
Null_Gtk_Recent_Chooser : constant Gtk_Recent_Chooser;
procedure On_Item_Activated
(Self : Gtk_Recent_Chooser;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
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.
procedure On_Item_Activated
(Self : Gtk_Recent_Chooser;
Call : Cb_Gtk_Recent_Chooser_Void;
After : Boolean := False)
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.
procedure On_Selection_Changed
(Self : Gtk_Recent_Chooser;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
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.
procedure On_Selection_Changed
(Self : Gtk_Recent_Chooser;
Call : Cb_Gtk_Recent_Chooser_Void;
After : Boolean := False)
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.
type Property_Gtk_Recent_Sort_Type is new Gtk_Recent_Sort_Type_Properties.Property;
Recent_Manager_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Recent_Manager.Gtk_Recent_Manager Flags: write The Gtk.Recent_Manager.Gtk_Recent_Manager instance used by the Gtk.Recent_Chooser.Gtk_Recent_Chooser to display the list of recently used resources.
procedure Remove_Filter
(Chooser : Gtk_Recent_Chooser;
Filter : not null access Gtk.Recent_Filter.Gtk_Recent_Filter_Record'Class)
Removes Filter from the list of Gtk.Recent_Filter.Gtk_Recent_Filter objects held by Chooser. Since: gtk+ 2.10
a Gtk.Recent_Filter.Gtk_Recent_Filter
procedure Select_All (Chooser : Gtk_Recent_Chooser)
Selects all the items inside Chooser, if the Chooser supports multiple selection. Since: gtk+ 2.10
Select_Multiple_Property : constant Glib.Properties.Property_Boolean;
Allow the user to select multiple resources.
function Select_Uri
(Chooser : Gtk_Recent_Chooser;
URI : UTF8_String) return Boolean
Selects Uri inside Chooser. Since: gtk+ 2.10
a URI
True if Uri was found.
function Set_Current_Uri
(Chooser : Gtk_Recent_Chooser;
URI : UTF8_String) return Boolean
Sets Uri as the current URI for Chooser. Since: gtk+ 2.10
a URI
True if the URI was found.
procedure Set_Filter
(Chooser : Gtk_Recent_Chooser;
Filter : access Gtk.Recent_Filter.Gtk_Recent_Filter_Record'Class)
Sets Filter as the current Gtk.Recent_Filter.Gtk_Recent_Filter object used by Chooser to affect the displayed recently used resources. Since: gtk+ 2.10
a Gtk.Recent_Filter.Gtk_Recent_Filter
procedure Set_Limit (Chooser : Gtk_Recent_Chooser; Limit : Glib.Gint)
Sets the number of items that should be returned by Gtk.Recent_Chooser.Get_Items and gtk_recent_chooser_get_uris. Since: gtk+ 2.10
a positive integer, or -1 for all items
procedure Set_Local_Only
(Chooser : Gtk_Recent_Chooser;
Local_Only : Boolean)
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: gtk+ 2.10
True if only local files can be shown
procedure Set_Select_Multiple
(Chooser : Gtk_Recent_Chooser;
Select_Multiple : Boolean)
Sets whether Chooser can select multiple items. Since: gtk+ 2.10
True if Chooser can select more than one item
procedure Set_Show_Icons
(Chooser : Gtk_Recent_Chooser;
Show_Icons : Boolean)
Sets whether Chooser should show an icon near the resource when displaying it. Since: gtk+ 2.10
whether to show an icon near the resource
procedure Set_Show_Not_Found
(Chooser : Gtk_Recent_Chooser;
Show_Not_Found : Boolean)
Sets whether Chooser should display the recently used resources that it didn't find. This only applies to local resources. Since: gtk+ 2.10
whether to show the local items we didn't find
procedure Set_Show_Private
(Chooser : Gtk_Recent_Chooser;
Show_Private : Boolean)
Whether to show recently used resources marked registered as private. Since: gtk+ 2.10
True to show private items, False otherwise
procedure Set_Show_Tips
(Chooser : Gtk_Recent_Chooser;
Show_Tips : Boolean)
Sets whether to show a tooltips containing the full path of each recently used resource in a Gtk.Recent_Chooser.Gtk_Recent_Chooser widget. Since: gtk+ 2.10
True if tooltips should be shown
procedure Set_Sort_Func
(Chooser : Gtk_Recent_Chooser;
Sort_Func : Gtk_Recent_Sort_Func;
Data_Destroy : Glib.G_Destroy_Notify_Address)
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. To the comparison function will be passed two Gtk.Recent_Info.Gtk_Recent_Info 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. Since: gtk+ 2.10
the comparison function
destroy notifier for Sort_Data, or null
procedure Set_Sort_Type
(Chooser : Gtk_Recent_Chooser;
Sort_Type : Gtk_Recent_Sort_Type)
Changes the sorting order of the recently used resources list displayed by Chooser. Since: gtk+ 2.10
sort order that the chooser should use
Show_Icons_Property : constant Glib.Properties.Property_Boolean;
Whether this Gtk.Recent_Chooser.Gtk_Recent_Chooser should display an icon near the item.
Show_Not_Found_Property : constant Glib.Properties.Property_Boolean;
Whether this Gtk.Recent_Chooser.Gtk_Recent_Chooser 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).
Show_Private_Property : constant Glib.Properties.Property_Boolean;
Show_Tips_Property : constant Glib.Properties.Property_Boolean;
Whether this Gtk.Recent_Chooser.Gtk_Recent_Chooser should display a tooltip containing the full path of the recently used resources.
Signal_Item_Activated : constant Glib.Signal_Name := "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.
Signal_Selection_Changed : constant Glib.Signal_Name := "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.
Sort_Type_Property : constant Gtk.Recent_Chooser.Property_Gtk_Recent_Sort_Type;
Type: Gtk_Recent_Sort_Type Sorting order to be used when displaying the recently used resources.
procedure Unselect_All (Chooser : Gtk_Recent_Chooser)
Unselects all the items inside Chooser. Since: gtk+ 2.10
procedure Unselect_Uri (Chooser : Gtk_Recent_Chooser; URI : UTF8_String)
Unselects Uri inside Chooser. Since: gtk+ 2.10
a URI