| 1 |
/* Copyright (C) 2006 The gtkmm Development Team |
| 2 |
* |
| 3 |
* This library is free software; you can redistribute it and/or |
| 4 |
* modify it under the terms of the GNU Lesser General Public |
| 5 |
* License as published by the Free Software Foundation; either |
| 6 |
* version 2.1 of the License, or (at your option) any later version. |
| 7 |
* |
| 8 |
* This library is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
* Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public |
| 14 |
* License along with this library; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
#include <gtkmm/menu.h> |
| 18 |
#include <gtkmm/recentchooser.h> |
| 19 |
#include <gtkmm/activatable.h> |
| 20 |
|
| 21 |
_DEFS(gtkmm,gtk) |
| 22 |
_PINCLUDE(gtkmm/private/menu_p.h) |
| 23 |
|
| 24 |
namespace Gtk |
| 25 |
{ |
| 26 |
|
| 27 |
/** RecentChooserMenu is a widget suitable for displaying recently used files |
| 28 |
* inside a menu. It can be used to set a sub-menu of a MenuItem using |
| 29 |
* MenuItem::item_set_submenu(), or as the menu of a MenuToolButton. |
| 30 |
* |
| 31 |
* Note that RecentChooserMenu does not have any methods of its own. Instead, |
| 32 |
* you should use the functions that work on a RecentChooser. |
| 33 |
* |
| 34 |
* @newin{2,10} |
| 35 |
* |
| 36 |
* @ingroup RecentFiles |
| 37 |
*/ |
| 38 |
class GTKMM_API RecentChooserMenu |
| 39 |
: public Menu, |
| 40 |
public RecentChooser, |
| 41 |
public Activatable |
| 42 |
{ |
| 43 |
_CLASS_GTKOBJECT(RecentChooserMenu, GtkRecentChooserMenu, GTK_RECENT_CHOOSER_MENU, Gtk::Menu, GtkMenu, , , GTKMM_API) |
| 44 |
_IMPLEMENTS_INTERFACE(RecentChooser) |
| 45 |
_IMPLEMENTS_INTERFACE(Activatable) |
| 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 |
_WRAP_PROPERTY("show-numbers", bool) |
| 55 |
}; |
| 56 |
|
| 57 |
} // namespace Gtk |