Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / stockitem.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_STOCKITEM_H
4 #define _GTKMM_STOCKITEM_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* Copyright(C) 1998-2002 The gtkmm Development Team
11  *
12  * This library is free software, ) you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation, ) either
15  * version 2 of the License, or(at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library, ) if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27 #include <gdkmm/types.h>
28 #include <gtkmm/stockid.h>
29
30
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 extern "C"
33 {
34   typedef struct _GtkStockItem GtkStockItem;
35 }
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38 namespace Gtk
39 {
40
41 class StockItem
42 {
43   public:
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45   typedef StockItem CppObjectType;
46   typedef GtkStockItem BaseObjectType;
47 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
48
49   StockItem();
50
51   // Use make_a_copy=true when getting it directly from a struct.
52   explicit StockItem(GtkStockItem* castitem, bool make_a_copy = false);
53
54   StockItem(const StockItem& src);
55   StockItem& operator=(const StockItem& src);
56
57   ~StockItem();
58
59   GtkStockItem*       gobj()       { return gobject_; }
60   const GtkStockItem* gobj() const { return gobject_; }
61
62   ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
63   GtkStockItem* gobj_copy() const;
64
65 protected:
66   GtkStockItem* gobject_;
67
68 private:
69
70
71 public:
72   StockItem(const Gtk::StockID& stock_id, const Glib::ustring& label,
73             Gdk::ModifierType modifier = Gdk::ModifierType(0), unsigned int keyval = 0,
74             const Glib::ustring& translation_domain = Glib::ustring());
75
76   StockID get_stock_id() const;
77   Glib::ustring get_label() const;
78   Gdk::ModifierType get_modifier() const;
79   guint get_keyval() const;
80   Glib::ustring get_translation_domain() const;
81
82   static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
83
84
85 };
86
87 } // namespace Gtk
88
89
90 namespace Glib
91 {
92
93   /** @relates Gtk::StockItem
94    * @param object The C instance
95    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
96    * @result A C++ instance that wraps this C instance.
97    */
98 Gtk::StockItem wrap(GtkStockItem* object, bool take_copy = false);
99
100 } // namespace Glib
101
102 #endif /* _GTKMM_STOCKITEM_H */
103