Gtk.Recent_Chooser

Entities

Simple Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

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
Parameters
W
Return Value

Add_Filter

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

Parameters
Chooser
Filter

a Gtk.Recent_Filter.Gtk_Recent_Filter

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Cb_Gtk_Recent_Chooser_Void

type Cb_Gtk_Recent_Chooser_Void is not null access procedure (Self : Gtk_Recent_Chooser);
Parameters
Self

Filter_Property

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.

Get_Current_Item

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

Parameters
Chooser
Return Value

a Gtk.Recent_Info.Gtk_Recent_Info. Use Gtk.Recent_Info.Unref when when you have finished using it.

Get_Current_Uri

function Get_Current_Uri
   (Chooser : Gtk_Recent_Chooser) return UTF8_String

Gets the URI currently selected by Chooser. Since: gtk+ 2.10

Parameters
Chooser
Return Value

a newly allocated string holding a URI.

Get_Filter

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

Parameters
Chooser
Return Value

a Gtk.Recent_Filter.Gtk_Recent_Filter object.

Get_Items

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

Parameters
Chooser
Return Value

Get_Limit

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

Parameters
Chooser
Return Value

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

Get_Local_Only

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

Parameters
Chooser
Return Value

True if only local resources should be shown.

Get_Select_Multiple

function Get_Select_Multiple
   (Chooser : Gtk_Recent_Chooser) return Boolean

Gets whether Chooser can select multiple items. Since: gtk+ 2.10

Parameters
Chooser
Return Value

True if Chooser can select more than one item.

Get_Show_Icons

function Get_Show_Icons (Chooser : Gtk_Recent_Chooser) return Boolean

Retrieves whether Chooser should show an icon near the resource. Since: gtk+ 2.10

Parameters
Chooser
Return Value

True if the icons should be displayed, False otherwise.

Get_Show_Not_Found

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

Parameters
Chooser
Return Value

True if the resources not found should be displayed, and False otheriwse.

Get_Show_Private

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

Parameters
Chooser
Return Value

True if the recent chooser should show private items, False otherwise.

Get_Show_Tips

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

Parameters
Chooser
Return Value

True if the recent chooser should show tooltips, False otherwise.

Get_Sort_Type

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

Parameters
Chooser
Return Value

the sorting order of the Chooser.

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Recent_Chooser

type Gtk_Recent_Chooser is new Glib.Types.GType_Interface;

Gtk_Recent_Sort_Func

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;
Parameters
A
B
Return Value

Gtk_Recent_Sort_Type

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.

Enumeration Literal
Recent_Sort_None
Recent_Sort_Mru
Recent_Sort_Lru
Recent_Sort_Custom

Gtk_Recent_Sort_Type_Properties

package Gtk_Recent_Sort_Type_Properties is
   new Generic_Internal_Discrete_Property (Gtk_Recent_Sort_Type);

Limit_Property

Limit_Property : constant Glib.Properties.Property_Int;

The maximum number of recently used resources to be displayed, or -1 to display all items.

List_Filters

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

Parameters
Chooser
Return Value

Local_Only_Property

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

Null_Gtk_Recent_Chooser : constant Gtk_Recent_Chooser;

On_Item_Activated

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.

Parameters
Self
Call
Slot
After

On_Item_Activated

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.

Parameters
Self
Call
After

On_Selection_Changed

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.

Parameters
Self
Call
Slot
After

On_Selection_Changed

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.

Parameters
Self
Call
After

Property_Gtk_Recent_Sort_Type

type Property_Gtk_Recent_Sort_Type is new Gtk_Recent_Sort_Type_Properties.Property;

Recent_Manager_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.

Remove_Filter

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

Parameters
Chooser
Filter

a Gtk.Recent_Filter.Gtk_Recent_Filter

Select_All

procedure Select_All (Chooser : Gtk_Recent_Chooser)

Selects all the items inside Chooser, if the Chooser supports multiple selection. Since: gtk+ 2.10

Parameters
Chooser

Select_Multiple_Property

Select_Multiple_Property : constant Glib.Properties.Property_Boolean;

Allow the user to select multiple resources.

Select_Uri

function Select_Uri
   (Chooser : Gtk_Recent_Chooser;
    URI     : UTF8_String) return Boolean

Selects Uri inside Chooser. Since: gtk+ 2.10

Parameters
Chooser
URI

a URI

Return Value

True if Uri was found.

Set_Current_Uri

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

Parameters
Chooser
URI

a URI

Return Value

True if the URI was found.

Set_Filter

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

Parameters
Chooser
Filter

a Gtk.Recent_Filter.Gtk_Recent_Filter

Set_Limit

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

Parameters
Chooser
Limit

a positive integer, or -1 for all items

Set_Local_Only

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

Parameters
Chooser
Local_Only

True if only local files can be shown

Set_Select_Multiple

procedure Set_Select_Multiple
   (Chooser         : Gtk_Recent_Chooser;
    Select_Multiple : Boolean)

Sets whether Chooser can select multiple items. Since: gtk+ 2.10

Parameters
Chooser
Select_Multiple

True if Chooser can select more than one item

Set_Show_Icons

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

Parameters
Chooser
Show_Icons

whether to show an icon near the resource

Set_Show_Not_Found

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

Parameters
Chooser
Show_Not_Found

whether to show the local items we didn't find

Set_Show_Private

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

Parameters
Chooser
Show_Private

True to show private items, False otherwise

Set_Show_Tips

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

Parameters
Chooser
Show_Tips

True if tooltips should be shown

Set_Sort_Func

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

Parameters
Chooser
Sort_Func

the comparison function

Data_Destroy

destroy notifier for Sort_Data, or null

Set_Sort_Type

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

Parameters
Chooser
Sort_Type

sort order that the chooser should use

Show_Icons_Property

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

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

Show_Private_Property : constant Glib.Properties.Property_Boolean;

Show_Tips_Property

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

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

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

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.

Unselect_All

procedure Unselect_All (Chooser : Gtk_Recent_Chooser)

Unselects all the items inside Chooser. Since: gtk+ 2.10

Parameters
Chooser

Unselect_Uri

procedure Unselect_Uri (Chooser : Gtk_Recent_Chooser; URI : UTF8_String)

Unselects Uri inside Chooser. Since: gtk+ 2.10

Parameters
Chooser
URI

a URI