CtkRecentChooserMenu

CtkRecentChooserMenu — Displays recently used files in a menu

Functions

Properties

gboolean show-numbers Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── CtkWidget
            ╰── CtkContainer
                ╰── CtkMenuShell
                    ╰── CtkMenu
                        ╰── CtkRecentChooserMenu

Implemented Interfaces

CtkRecentChooserMenu implements AtkImplementorIface, CtkBuildable, CtkRecentChooser and CtkActivatable.

Includes

#include <ctk/ctk.h>

Description

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.

Functions

ctk_recent_chooser_menu_new ()

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.

Returns

a new CtkRecentChooserMenu

Since: 2.10


ctk_recent_chooser_menu_new_for_manager ()

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.

Parameters

manager

a CtkRecentManager

 

Returns

a new CtkRecentChooserMenu, bound to manager .

Since: 2.10


ctk_recent_chooser_menu_get_show_numbers ()

gboolean
ctk_recent_chooser_menu_get_show_numbers
                               (CtkRecentChooserMenu *menu);

Returns the value set by ctk_recent_chooser_menu_set_show_numbers().

Parameters

Returns

TRUE if numbers should be shown.

Since: 2.10


ctk_recent_chooser_menu_set_show_numbers ()

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.

Parameters

menu

a CtkRecentChooserMenu

 

show_numbers

whether to show numbers

 

Since: 2.10

Types and Values

struct CtkRecentChooserMenu

struct CtkRecentChooserMenu;

Property Details

The “show-numbers” property

  “show-numbers”             gboolean

Whether the first ten items in the menu should be prepended by a number acting as a unique mnemonic.

Owner: CtkRecentChooserMenu

Flags: Read / Write

Default value: FALSE

Since: 2.10

See Also

CtkRecentChooser