| Top |
GObject
╰── GInitiallyUnowned
╰── CtkWidget
╰── CtkContainer
╰── CtkMenuShell
╰── CtkMenu
╰── CtkRecentChooserMenu
CtkRecentChooserMenu implements AtkImplementorIface, CtkBuildable, CtkRecentChooser and CtkActivatable.
CtkRecentChooserMenu is a widget suitable for displaying recently used files
inside a menu. It can be used to set a sub-menu of a CtkMenuItem using
ctk_menu_item_set_submenu(), or as the menu of a CtkMenuToolButton.
Note that CtkRecentChooserMenu does not have any methods of its own. Instead, you should use the functions that work on a CtkRecentChooser.
Note also that CtkRecentChooserMenu does not support multiple filters, as it
has no way to let the user choose between them as the CtkRecentChooserWidget
and CtkRecentChooserDialog widgets do. Thus using ctk_recent_chooser_add_filter()
on a CtkRecentChooserMenu widget will yield the same effects as using
ctk_recent_chooser_set_filter(), replacing any currently set filter
with the supplied filter; ctk_recent_chooser_remove_filter() will remove
any currently set CtkRecentFilter object and will unset the current filter;
ctk_recent_chooser_list_filters() will return a list containing a single
CtkRecentFilter object.
Recently used files are supported since CTK+ 2.10.
CtkWidget *
ctk_recent_chooser_menu_new (void);
Creates a new CtkRecentChooserMenu widget.
This kind of widget shows the list of recently used resources as a menu, each item as a menu item. Each item inside the menu might have an icon, representing its MIME type, and a number, for mnemonic access.
This widget implements the CtkRecentChooser interface.
This widget creates its own CtkRecentManager object. See the
ctk_recent_chooser_menu_new_for_manager() function to know how to create
a CtkRecentChooserMenu widget bound to another CtkRecentManager object.
Since: 2.10
CtkWidget *
ctk_recent_chooser_menu_new_for_manager
(CtkRecentManager *manager);
Creates a new CtkRecentChooserMenu widget using manager
as
the underlying recently used resources manager.
This is useful if you have implemented your own recent manager, or if you have a customized instance of a CtkRecentManager object or if you wish to share a common CtkRecentManager object among multiple CtkRecentChooser widgets.
Since: 2.10
gboolean
ctk_recent_chooser_menu_get_show_numbers
(CtkRecentChooserMenu *menu);
Returns the value set by ctk_recent_chooser_menu_set_show_numbers().
Since: 2.10
void ctk_recent_chooser_menu_set_show_numbers (CtkRecentChooserMenu *menu,gboolean show_numbers);
Sets whether a number should be added to the items of menu
. The
numbers are shown to provide a unique character for a mnemonic to
be used inside ten menu item’s label. Only the first the items
get a number to avoid clashes.
Since: 2.10