Ardour  9.0-pre0-427-gd2a3450e2f
Gtk::RecentChooser Class Reference

#include <recentchooser.h>

Inheritance diagram for Gtk::RecentChooser:
[legend]

Public Types

typedef sigc::slot< int, const Glib::RefPtr< RecentInfo > &, const Glib::RefPtr< RecentInfo > & > SlotCompare
 
typedef Glib::ListHandle< RecentInfo, RecentInfoTraits > ListHandle_RecentInfos
 

Public Member Functions

virtual ~RecentChooser ()
 
GtkRecentChoosergobj ()
 Provides access to the underlying C GObject. More...
 
const GtkRecentChoosergobj () const
 Provides access to the underlying C GObject. More...
 
void set_show_private (bool show_private=true)
 
bool get_show_private () const
 
void set_show_not_found (bool show_not_found=true)
 
bool get_show_not_found () const
 
void set_select_multiple (bool select_multiple=true)
 
bool get_select_multiple () const
 
void set_limit (int limit)
 
void unset_limit ()
 
int get_limit () const
 
void set_local_only (bool local_only=true)
 
bool get_local_only () const
 
void set_show_tips (bool show_tips=true)
 
bool get_show_tips () const
 
void set_show_icons (bool show_icons=true)
 
bool get_show_icons () const
 
void set_sort_type (RecentSortType sort_type)
 
RecentSortType get_sort_type () const
 
void set_sort_func (const SlotCompare &slot)
 
bool set_current_uri (const Glib::ustring &uri)
 
Glib::ustring get_current_uri () const
 
Glib::RefPtr< RecentInfoget_current_item ()
 
Glib::RefPtr< const RecentInfoget_current_item () const
 
bool select_uri (const Glib::ustring &uri)
 
void unselect_uri (const Glib::ustring &uri)
 
void select_all ()
 
void unselect_all ()
 
ListHandle_RecentInfos get_items () const
 
Glib::StringArrayHandle get_uris () const
 
void add_filter (const RecentFilter &filter)
 
void remove_filter (const RecentFilter &filter)
 
Glib::SListHandle< RecentFilter * > list_filters ()
 
Glib::SListHandle< const RecentFilter * > list_filters () const
 
void set_filter (const RecentFilter &filter)
 
RecentFilterget_filter ()
 
const RecentFilterget_filter () const
 
Glib::SignalProxy0< void > signal_selection_changed ()
 
Glib::SignalProxy0< void > signal_item_activated ()
 
Glib::PropertyProxy< bool > property_show_private ()
 
Glib::PropertyProxy_ReadOnly< bool > property_show_private () const
 
Glib::PropertyProxy< bool > property_show_tips ()
 
Glib::PropertyProxy_ReadOnly< bool > property_show_tips () const
 
Glib::PropertyProxy< bool > property_show_icons ()
 
Glib::PropertyProxy_ReadOnly< bool > property_show_icons () const
 
Glib::PropertyProxy< bool > property_show_not_found ()
 
Glib::PropertyProxy_ReadOnly< bool > property_show_not_found () const
 
Glib::PropertyProxy< bool > property_select_multiple ()
 
Glib::PropertyProxy_ReadOnly< bool > property_select_multiple () const
 
Glib::PropertyProxy< bool > property_local_only ()
 
Glib::PropertyProxy_ReadOnly< bool > property_local_only () const
 
Glib::PropertyProxy< int > property_limit ()
 
Glib::PropertyProxy_ReadOnly< int > property_limit () const
 
Glib::PropertyProxy< RecentSortTypeproperty_sort_type ()
 
Glib::PropertyProxy_ReadOnly< RecentSortTypeproperty_sort_type () const
 
Glib::PropertyProxy< RecentFilter * > property_filter ()
 
Glib::PropertyProxy_ReadOnly< RecentFilter * > property_filter () const
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type () G_GNUC_CONST
 

Protected Member Functions

 RecentChooser ()
 
virtual Glib::ustring get_current_uri_vfunc () const
 
virtual void unselect_uri_vfunc (const Glib::ustring &uri)
 
virtual void select_all_vfunc ()
 
virtual void unselect_all_vfunc ()
 
virtual Glib::RefPtr< RecentManagerget_recent_manager_vfunc ()
 
virtual void add_filter_vfunc (const RecentFilter &filter)
 
virtual void remove_filter_vfunc (const RecentFilter &filter)
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::RecentChooserwrap (GtkRecentChooser *object, bool take_copy=false)
 

Detailed Description

RecentChooser 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 RecentChooserWidget, RecentChooserDialog and RecentChooserMenu.

Definition at line 147 of file recentchooser.h.

Member Typedef Documentation

◆ ListHandle_RecentInfos

typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> Gtk::RecentChooser::ListHandle_RecentInfos

Definition at line 398 of file recentchooser.h.

◆ SlotCompare

typedef sigc::slot<int, const Glib::RefPtr<RecentInfo>&, const Glib::RefPtr<RecentInfo>&> Gtk::RecentChooser::SlotCompare

This callback should return -1 if b compares before a, 0 if they compare equal and 1 if a compares after b. For instance, int on_sort_compare(const Glib::RefPtr<Gtk::RecentInfo>& a, const Gtk::RecentInfo& b);

Definition at line 337 of file recentchooser.h.

Constructor & Destructor Documentation

◆ RecentChooser()

Gtk::RecentChooser::RecentChooser ( )
protected

You should derive from this class to use it.

◆ ~RecentChooser()

virtual Gtk::RecentChooser::~RecentChooser ( )
virtual

Member Function Documentation

◆ add_filter()

void Gtk::RecentChooser::add_filter ( const RecentFilter filter)

Adds filter to the list of Gtk::RecentFilter objects held by chooser.

If no previous filter objects were defined, this function will call set_filter().

Parameters
filterA Gtk::RecentFilter.

◆ add_filter_vfunc()

virtual void Gtk::RecentChooser::add_filter_vfunc ( const RecentFilter filter)
protectedvirtual

◆ add_interface()

static void Gtk::RecentChooser::add_interface ( GType  gtype_implementer)
static

◆ get_current_item() [1/2]

Glib::RefPtr<RecentInfo> Gtk::RecentChooser::get_current_item ( )

Gets the Gtk::RecentInfo currently selected by chooser.

Returns
A Gtk::RecentInfo. Use Gtk::RecentInfo::unref() when when you have finished using it.

◆ get_current_item() [2/2]

Glib::RefPtr<const RecentInfo> Gtk::RecentChooser::get_current_item ( ) const

Gets the Gtk::RecentInfo currently selected by chooser.

Returns
A Gtk::RecentInfo. Use Gtk::RecentInfo::unref() when when you have finished using it.

◆ get_current_uri()

Glib::ustring Gtk::RecentChooser::get_current_uri ( ) const

Gets the URI currently selected by chooser.

Returns
A newly allocated string holding a URI.

◆ get_current_uri_vfunc()

virtual Glib::ustring Gtk::RecentChooser::get_current_uri_vfunc ( ) const
protectedvirtual

◆ get_filter() [1/2]

RecentFilter* Gtk::RecentChooser::get_filter ( )

Gets the Gtk::RecentFilter object currently used by chooser to affect the display of the recently used resources.

Returns
A Gtk::RecentFilter object.

◆ get_filter() [2/2]

const RecentFilter* Gtk::RecentChooser::get_filter ( ) const

Gets the Gtk::RecentFilter object currently used by chooser to affect the display of the recently used resources.

Returns
A Gtk::RecentFilter object.

◆ get_items()

ListHandle_RecentInfos Gtk::RecentChooser::get_items ( ) const

Gets the list of recently used resources in form of Gtk::RecentInfo objects.

The return value of this function is affected by the "sort-type" and "limit" properties of chooser.

Returns
A newly allocated list of Gtk::RecentInfo objects. You should use Gtk::RecentInfo::unref() on every item of the list, and then free the list itself using Glib::list_free().

◆ get_limit()

int Gtk::RecentChooser::get_limit ( ) const

Gets the number of items returned by get_items() and get_uris().

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

◆ get_local_only()

bool Gtk::RecentChooser::get_local_only ( ) const

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.

◆ get_recent_manager_vfunc()

virtual Glib::RefPtr<RecentManager> Gtk::RecentChooser::get_recent_manager_vfunc ( )
protectedvirtual

◆ get_select_multiple()

bool Gtk::RecentChooser::get_select_multiple ( ) const

Gets whether chooser can select multiple items.

Returns
true if chooser can select more than one item.

◆ get_show_icons()

bool Gtk::RecentChooser::get_show_icons ( ) const

Retrieves whether chooser should show an icon near the resource.

Returns
true if the icons should be displayed, false otherwise.

◆ get_show_not_found()

bool Gtk::RecentChooser::get_show_not_found ( ) const

Retrieves whether chooser should show the recently used resources that were not found.

Returns
true if the resources not found should be displayed, and false otheriwse.

◆ get_show_private()

bool Gtk::RecentChooser::get_show_private ( ) const

Returns whether chooser should display recently used resources registered as private.

Returns
true if the recent chooser should show private items, false otherwise.

◆ get_show_tips()

bool Gtk::RecentChooser::get_show_tips ( ) const

Gets whether chooser should display tooltips containing the full path of a recently user resource.

Returns
true if the recent chooser should show tooltips, false otherwise.

◆ get_sort_type()

RecentSortType Gtk::RecentChooser::get_sort_type ( ) const

Gets the value set by set_sort_type().

Returns
The sorting order of the chooser.

◆ get_type()

static GType Gtk::RecentChooser::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ get_uris()

Glib::StringArrayHandle Gtk::RecentChooser::get_uris ( ) const

Gets the URI of the recently used resources.

The return value of this function is affected by the "sort-type" and "limit" properties of the recent chooser.

◆ gobj() [1/2]

GtkRecentChooser* Gtk::RecentChooser::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 205 of file recentchooser.h.

◆ gobj() [2/2]

const GtkRecentChooser* Gtk::RecentChooser::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 208 of file recentchooser.h.

◆ list_filters() [1/2]

Glib::SListHandle<RecentFilter*> Gtk::RecentChooser::list_filters ( )

Gets the Gtk::RecentFilter objects held by chooser.

Returns
A singly linked list of Gtk::RecentFilter objects. You should just free the returned list using Glib::slist_free().

◆ list_filters() [2/2]

Glib::SListHandle<const RecentFilter*> Gtk::RecentChooser::list_filters ( ) const

Gets the Gtk::RecentFilter objects held by chooser.

Returns
A singly linked list of Gtk::RecentFilter objects. You should just free the returned list using Glib::slist_free().

◆ property_filter() [1/2]

Glib::PropertyProxy< RecentFilter* > Gtk::RecentChooser::property_filter ( )

The current filter for selecting which resources are displayed.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_filter() [2/2]

Glib::PropertyProxy_ReadOnly< RecentFilter* > Gtk::RecentChooser::property_filter ( ) const

The current filter for selecting which resources are displayed.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_limit() [1/2]

Glib::PropertyProxy< int > Gtk::RecentChooser::property_limit ( )

The maximum number of items to be displayed.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_limit() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::RecentChooser::property_limit ( ) const

The maximum number of items to be displayed.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_local_only() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_local_only ( )

Whether the selected resource(s) should be limited to local file: URIs.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_local_only() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_local_only ( ) const

Whether the selected resource(s) should be limited to local file: URIs.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_select_multiple() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_select_multiple ( )

Whether to allow multiple items to be selected.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_select_multiple() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_select_multiple ( ) const

Whether to allow multiple items to be selected.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_show_icons() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_show_icons ( )

Whether there should be an icon near the item.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_show_icons() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_show_icons ( ) const

Whether there should be an icon near the item.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_show_not_found() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_show_not_found ( )

Whether the items pointing to unavailable resources should be displayed.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_show_not_found() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_show_not_found ( ) const

Whether the items pointing to unavailable resources should be displayed.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_show_private() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_show_private ( )

Whether the private items should be displayed.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_show_private() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_show_private ( ) const

Whether the private items should be displayed.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_show_tips() [1/2]

Glib::PropertyProxy< bool > Gtk::RecentChooser::property_show_tips ( )

Whether there should be a tooltip on the item.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_show_tips() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::RecentChooser::property_show_tips ( ) const

Whether there should be a tooltip on the item.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_sort_type() [1/2]

Glib::PropertyProxy< RecentSortType > Gtk::RecentChooser::property_sort_type ( )

The sorting order of the items displayed.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_sort_type() [2/2]

Glib::PropertyProxy_ReadOnly< RecentSortType > Gtk::RecentChooser::property_sort_type ( ) const

The sorting order of the items displayed.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ remove_filter()

void Gtk::RecentChooser::remove_filter ( const RecentFilter filter)

Removes filter from the list of Gtk::RecentFilter objects held by chooser.

Parameters
filterA Gtk::RecentFilter.

◆ remove_filter_vfunc()

virtual void Gtk::RecentChooser::remove_filter_vfunc ( const RecentFilter filter)
protectedvirtual

◆ select_all()

void Gtk::RecentChooser::select_all ( )

Selects all the items inside chooser, if the chooser supports multiple selection.

◆ select_all_vfunc()

virtual void Gtk::RecentChooser::select_all_vfunc ( )
protectedvirtual

◆ select_uri()

bool Gtk::RecentChooser::select_uri ( const Glib::ustring &  uri)

Selects uri inside chooser.

Parameters
uriA URI.
Returns
true if uri was found.

◆ set_current_uri()

bool Gtk::RecentChooser::set_current_uri ( const Glib::ustring &  uri)

Sets uri as the current URI for chooser.

Parameters
uriA URI.
Returns
true if the URI was found.

◆ set_filter()

void Gtk::RecentChooser::set_filter ( const RecentFilter filter)

Sets filter as the current Gtk::RecentFilter object used by chooser to affect the displayed recently used resources.

Parameters
filterA Gtk::RecentFilter.

◆ set_limit()

void Gtk::RecentChooser::set_limit ( int  limit)

Sets the number of items that should be returned by get_items() and get_uris().

Parameters
limitA positive integer, or -1 for all items.

◆ set_local_only()

void Gtk::RecentChooser::set_local_only ( bool  local_only = true)

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.

Parameters
local_onlytrue if only local files can be shown.

◆ set_select_multiple()

void Gtk::RecentChooser::set_select_multiple ( bool  select_multiple = true)

Sets whether chooser can select multiple items.

Parameters
select_multipletrue if chooser can select more than one item.

◆ set_show_icons()

void Gtk::RecentChooser::set_show_icons ( bool  show_icons = true)

Sets whether chooser should show an icon near the resource when displaying it.

Parameters
show_iconsWhether to show an icon near the resource.

◆ set_show_not_found()

void Gtk::RecentChooser::set_show_not_found ( bool  show_not_found = true)

Sets whether chooser should display the recently used resources that it didn't find. This only applies to local resources.

Parameters
show_not_foundWhether to show the local items we didn't find.

◆ set_show_private()

void Gtk::RecentChooser::set_show_private ( bool  show_private = true)

Whether to show recently used resources marked registered as private.

Parameters
show_privatetrue to show private items, false otherwise.

◆ set_show_tips()

void Gtk::RecentChooser::set_show_tips ( bool  show_tips = true)

Sets whether to show a tooltips containing the full path of each recently used resource in a Gtk::RecentChooser widget.

Parameters
show_tipstrue if tooltips should be shown.

◆ set_sort_func()

void Gtk::RecentChooser::set_sort_func ( const SlotCompare slot)

Sets the comparison function used when sorting the list of recently used resources and the sort type is RECENT_SORT_CUSTOM.

◆ set_sort_type()

void Gtk::RecentChooser::set_sort_type ( RecentSortType  sort_type)

Changes the sorting order of the recently used resources list displayed by chooser.

Parameters
sort_typeSort order that the chooser should use.

◆ signal_item_activated()

Glib::SignalProxy0< void > Gtk::RecentChooser::signal_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.

Slot Prototype:
void on_my_item_activated()

◆ signal_selection_changed()

Glib::SignalProxy0< void > Gtk::RecentChooser::signal_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 explicitely calling functions to change the selection.

Slot Prototype:
void on_my_selection_changed()

◆ unselect_all()

void Gtk::RecentChooser::unselect_all ( )

Unselects all the items inside chooser.

◆ unselect_all_vfunc()

virtual void Gtk::RecentChooser::unselect_all_vfunc ( )
protectedvirtual

◆ unselect_uri()

void Gtk::RecentChooser::unselect_uri ( const Glib::ustring &  uri)

Unselects uri inside chooser.

Parameters
uriA URI.

◆ unselect_uri_vfunc()

virtual void Gtk::RecentChooser::unselect_uri_vfunc ( const Glib::ustring &  uri)
protectedvirtual

◆ unset_limit()

void Gtk::RecentChooser::unset_limit ( )

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gtk::RecentChooser > wrap ( GtkRecentChooser object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: