Debian Codegraph @

gtk/src/stockitem.hg

raw
1 /* Copyright (C) 1998-2002 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 // To exclude this file from the documentation when build-deprecated-api=false.
18 _CONFIGINCLUDE(gtkmmconfig.h)
19
20 #include <gdkmm/types.h>
21 #include <gtkmm/stockid.h>
22
23 _DEFS(gtkmm,gtk)
24
25 #m4 _PUSH(SECTION_CC_PRE_INCLUDES)
26 #undef GTK_DISABLE_DEPRECATED
27 #define GDK_DISABLE_DEPRECATION_WARNINGS 1
28 #m4 _POP()
29
30 _IS_DEPRECATED // This whole file is deprecated.
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 extern "C"
34 {
35 typedef struct _GtkStockItem GtkStockItem;
36 }
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39 namespace Gtk
40 {
41
42 /** @deprecated Use icon names instead of StockItem, StockID and BuiltinStockID.
43 *
44 * Key values are the codes which are sent whenever a key is pressed or released.
45 * The complete list of key values can be found in the
46 * <a href="https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-24/gdk/gdkkeysyms.h">gdk/gdkkeysyms.h</a>
47 * header file. They are prefixed with <tt>GDK_KEY_</tt>.
48 */
49 class GTKMM_API StockItem
50 {
51 _CLASS_OPAQUE_COPYABLE(StockItem, GtkStockItem, NONE, gtk_stock_item_copy, gtk_stock_item_free, GTKMM_API)
52
53 public:
54 StockItem(const Gtk::StockID& stock_id, const Glib::ustring& label,
55 Gdk::ModifierType modifier = Gdk::ModifierType(0), unsigned int keyval = 0,
56 const Glib::ustring& translation_domain = Glib::ustring());
57
58 _MEMBER_GET(stock_id, stock_id, StockID, char*)
59 _MEMBER_GET(label, label, Glib::ustring, char*)
60 _MEMBER_GET(modifier, modifier, Gdk::ModifierType, GdkModifierType)
61 _MEMBER_GET(keyval, keyval, guint, guint)
62 _MEMBER_GET(translation_domain, translation_domain, Glib::ustring, char*)
63
64 static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
65 };
66
67 } // namespace Gtk