Main Page Widgets Namespaces Book

# Gtk::ImageMenuItem Class Reference
[Menu classes, Widgets]

A menu item with an icon. More...

Inheritance diagram for Gtk::ImageMenuItem:

[legend]

List of all members.

## Public Member Functions
const Widget* | get_image () const
| Gets the widget that is currently set as the image of image_menu_item.
Widget* | get_image ()
| Gets the widget that is currently set as the image of image_menu_item.
const GtkImageMenuItem* | gobj () const
| Provides access to the underlying C GtkObject.
GtkImageMenuItem* | gobj ()
| Provides access to the underlying C GtkObject.
| ImageMenuItem (const StockID& id)
| ImageMenuItem (const Glib::ustring& label, bool mnemonic=false)
| ImageMenuItem (Widget& image, const Glib::ustring& label, bool mnemonic=false)
| ImageMenuItem ()
void | set_image (Widget& image)
| Sets the image of image_menu_item to the given widget.
virtual | ~ImageMenuItem ()
## Related Functions
(Note that these are not member functions.)
Gtk::ImageMenuItem* | wrap (GtkImageMenuItem* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A menu item with an icon.

A GtkImageMenuItem is a menu item which has an icon next to the text label. Note that the user can disable display of menu icons, so make sure to still fill in the text label.

## Constructor & Destructor Documentation

virtual Gtk::ImageMenuItem::~ImageMenuItem | ( |  | ) | `[virtual]`

Gtk::ImageMenuItem::ImageMenuItem | ( |  | ) |

Gtk::ImageMenuItem::ImageMenuItem | ( | Widget& | image,
|  | const Glib::ustring & | label,
|  | bool | mnemonic = `false` |
| ) |  |  | `[explicit]`

Gtk::ImageMenuItem::ImageMenuItem | ( | const Glib::ustring & | label,
|  | bool | mnemonic = `false` |
| ) |  |  | `[explicit]`

Gtk::ImageMenuItem::ImageMenuItem | ( | const StockID& | id | ) | `[explicit]`

## Member Function Documentation

const Widget* Gtk::ImageMenuItem::get_image | ( |  | ) | const

Gets the widget that is currently set as the image of image_menu_item.

See set_image().

Returns:
  The widget set as image of image_menu_item.

Widget* Gtk::ImageMenuItem::get_image | ( |  | ) |

Gets the widget that is currently set as the image of image_menu_item.

See set_image().

Returns:
  The widget set as image of image_menu_item.

const GtkImageMenuItem* Gtk::ImageMenuItem::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::MenuItem.

GtkImageMenuItem* Gtk::ImageMenuItem::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::MenuItem.

void Gtk::ImageMenuItem::set_image | ( | Widget& | image | ) |

Sets the image of image_menu_item to the given widget.

Note that it depends on the show-menu-images setting whether the image will be displayed or not.

Parameters:

  | image | A widget to set as the image for the menu item.

## Friends And Related Function Documentation

Gtk::ImageMenuItem* wrap | ( | GtkImageMenuItem * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- imagemenuitem.h