2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_STOCKITEM_H
4 #define _GTKMM_STOCKITEM_H
10 /* Copyright(C) 1998-2002 The gtkmm Development Team
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.
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.
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.
27 #include <gdkmm/types.h>
28 #include <gtkmm/stockid.h>
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkStockItem GtkStockItem;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 typedef StockItem CppObjectType;
46 typedef GtkStockItem BaseObjectType;
47 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51 // Use make_a_copy=true when getting it directly from a struct.
52 explicit StockItem(GtkStockItem* castitem, bool make_a_copy = false);
54 StockItem(const StockItem& src);
55 StockItem& operator=(const StockItem& src);
59 GtkStockItem* gobj() { return gobject_; }
60 const GtkStockItem* gobj() const { return gobject_; }
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;
66 GtkStockItem* gobject_;
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());
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;
82 static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
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.
98 Gtk::StockItem wrap(GtkStockItem* object, bool take_copy = false);
102 #endif /* _GTKMM_STOCKITEM_H */