add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / src / recentchoosermenu.hg
1 /* recentchoosermenu.h
2  *
3  * Copyright (C) 2006 The gtkmm Development Team
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #include <gtkmm/menu.h>
21 #include <gtkmm/recentchooser.h>
22
23 _DEFS(gtkmm,gtk)
24 _PINCLUDE(gtkmm/private/menu_p.h)
25
26 namespace Gtk
27 {
28
29 /** RecentChooserMenu is a widget suitable for displaying recently used files
30  * inside a menu.  It can be used to set a sub-menu of a MenuItem using
31  * MenuItem::item_set_submenu(), or as the menu of a MenuToolButton.
32  *
33  * Note that RecentChooserMenu does not have any methods of its own. Instead,
34  * you should use the functions that work on a RecentChooser.
35  *
36  * @newin2p10
37  *
38  * @ingroup RecentFiles
39  */
40 class RecentChooserMenu
41   : public Menu,
42     public RecentChooser
43 {
44   _CLASS_GTKOBJECT(RecentChooserMenu, GtkRecentChooserMenu, GTK_RECENT_CHOOSER_MENU, Gtk::Menu, GtkMenu)
45   _IMPLEMENTS_INTERFACE(RecentChooser)
46 public:
47   _CTOR_DEFAULT;
48
49   _WRAP_CTOR(RecentChooserMenu(const Glib::RefPtr<RecentManager>& recent_manager), gtk_recent_chooser_menu_new_for_manager)
50
51   _WRAP_METHOD(void set_show_numbers(bool show_numbers = true), gtk_recent_chooser_menu_set_show_numbers)
52   _WRAP_METHOD(bool get_show_numbers() const, gtk_recent_chooser_menu_get_show_numbers)
53 };
54
55 } // namespace Gtk
56