Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / src / stockitem.hg
1 /* $Id: stockitem.hg,v 1.2 2004/04/11 21:00:53 murrayc Exp $ */
2
3 /* Copyright(C) 1998-2002 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 <gdkmm/types.h>
21 #include <gtkmm/stockid.h>
22
23 _DEFS(gtkmm,gtk)
24
25 #ifndef DOXYGEN_SHOULD_SKIP_THIS
26 extern "C"
27 {
28   typedef struct _GtkStockItem GtkStockItem;
29 }
30 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
31
32 namespace Gtk
33 {
34
35 class StockItem
36 {
37   _CLASS_OPAQUE_COPYABLE(StockItem, GtkStockItem, NONE, gtk_stock_item_copy, gtk_stock_item_free)
38
39 public:
40   StockItem(const Gtk::StockID& stock_id, const Glib::ustring& label,
41             Gdk::ModifierType modifier = Gdk::ModifierType(0), unsigned int keyval = 0,
42             const Glib::ustring& translation_domain = Glib::ustring());
43
44   _MEMBER_GET(stock_id, stock_id, StockID, char*)
45   _MEMBER_GET(label, label, Glib::ustring, char*)
46   _MEMBER_GET(modifier, modifier, Gdk::ModifierType, GdkModifierType)
47   _MEMBER_GET(keyval, keyval, guint, guint)
48   _MEMBER_GET(translation_domain, translation_domain, Glib::ustring, char*)
49
50   static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
51 };
52
53 } // namespace Gtk
54