2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_IMAGEMENUITEM_H
4 #define _GTKMM_IMAGEMENUITEM_H
13 * Copyright (C) 1998-2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gtkmm/menuitem.h>
31 #include <gtkmm/stockid.h>
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkImageMenuItem GtkImageMenuItem;
36 typedef struct _GtkImageMenuItemClass GtkImageMenuItemClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 { class ImageMenuItem_Class; } // namespace Gtk
45 /** A menu item with an icon.
47 * A GtkImageMenuItem is a menu item which has an icon next to the text label. Note that the
48 * user can disable display of menu icons, so make sure to still fill in the text label.
54 class ImageMenuItem : public MenuItem
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 typedef ImageMenuItem CppObjectType;
59 typedef ImageMenuItem_Class CppClassType;
60 typedef GtkImageMenuItem BaseObjectType;
61 typedef GtkImageMenuItemClass BaseClassType;
62 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
64 virtual ~ImageMenuItem();
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
69 friend class ImageMenuItem_Class;
70 static CppClassType imagemenuitem_class_;
73 ImageMenuItem(const ImageMenuItem&);
74 ImageMenuItem& operator=(const ImageMenuItem&);
77 explicit ImageMenuItem(const Glib::ConstructParams& construct_params);
78 explicit ImageMenuItem(GtkImageMenuItem* castitem);
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
83 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84 static GType get_type() G_GNUC_CONST;
85 static GType get_base_type() G_GNUC_CONST;
88 ///Provides access to the underlying C GtkObject.
89 GtkImageMenuItem* gobj() { return reinterpret_cast<GtkImageMenuItem*>(gobject_); }
91 ///Provides access to the underlying C GtkObject.
92 const GtkImageMenuItem* gobj() const { return reinterpret_cast<GtkImageMenuItem*>(gobject_); }
96 //C++ methods used to invoke GTK+ virtual functions:
97 #ifdef GLIBMM_VFUNCS_ENABLED
98 #endif //GLIBMM_VFUNCS_ENABLED
101 //GTK+ Virtual Functions (override these to change behaviour):
102 #ifdef GLIBMM_VFUNCS_ENABLED
103 #endif //GLIBMM_VFUNCS_ENABLED
105 //Default Signal Handlers::
106 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
107 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
115 explicit ImageMenuItem(Widget& image,
116 const Glib::ustring& label, bool mnemonic = false);
117 explicit ImageMenuItem(const Glib::ustring& label, bool mnemonic = false);
118 explicit ImageMenuItem(const StockID& id);
121 /** Sets the image of @a image_menu_item to the given widget.
122 * Note that it depends on the show-menu-images setting whether
123 * the image will be displayed or not.
124 * @param image A widget to set as the image for the menu item.
126 void set_image(Widget& image);
128 /** Gets the widget that is currently set as the image of @a image_menu_item .
130 * @return The widget set as image of @a image_menu_item .
134 /** Gets the widget that is currently set as the image of @a image_menu_item .
136 * @return The widget set as image of @a image_menu_item .
138 const Widget* get_image() const;
143 } /* namespace Gtk */
148 /** A Glib::wrap() method for this object.
150 * @param object The C instance.
151 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
152 * @result A C++ instance that wraps this C instance.
154 * @relates Gtk::ImageMenuItem
156 Gtk::ImageMenuItem* wrap(GtkImageMenuItem* object, bool take_copy = false);
160 #endif /* _GTKMM_IMAGEMENUITEM_H */