logo top
Main Page   Widgets   Namespaces   Book  

Gtk::ImageMenuItem Class Reference
[Menu classesWidgets]

Inheritance diagram for Gtk::ImageMenuItem:

List of all members.


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.

Public Member Functions

const Widgetget_image () const
 Gets the widget that is currently set as the image of image_menu_item.
Widgetget_image ()
 Gets the widget that is currently set as the image of image_menu_item.
bool get_use_stock () const
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 ()
Glib::PropertyProxy_WriteOnly
<Glib::RefPtr<AccelGroup>> 
property_accel_group ()
 The Accel Group to use for stock accelerator keys.
Glib::PropertyProxy_ReadOnly
<Widget*> 
property_image () const
 Child widget to appear next to the menu text.
Glib::PropertyProxy<Widget*> property_image ()
 Child widget to appear next to the menu text.
Glib::PropertyProxy_ReadOnly
<bool> 
property_use_stock () const
 Whether to use the label text to create a stock menu item.
Glib::PropertyProxy<bool> property_use_stock ()
 Whether to use the label text to create a stock menu item.
void set_accel_group (const Glib::RefPtr<AccelGroup>& accel_group)
void set_image (Widget& image)
 Sets the image of image_menu_item to the given widget.
void set_use_stock (bool use_stock=true)
virtual ~ImageMenuItem ()

Related Functions

(Note that these are not member functions.)

Gtk::ImageMenuItemwrap (GtkImageMenuItem* object, bool take_copy=false)
 A Glib::wrap() method for this object.


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.

bool Gtk::ImageMenuItem::get_use_stock (  )  const

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.

Glib::PropertyProxy_WriteOnly<Glib::RefPtr<AccelGroup>> Gtk::ImageMenuItem::property_accel_group (  ) 

The Accel Group to use for stock accelerator keys.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Widget*> Gtk::ImageMenuItem::property_image (  )  const

Child widget to appear next to the menu text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Widget*> Gtk::ImageMenuItem::property_image (  ) 

Child widget to appear next to the menu text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::ImageMenuItem::property_use_stock (  )  const

Whether to use the label text to create a stock menu item.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::ImageMenuItem::property_use_stock (  ) 

Whether to use the label text to create a stock menu item.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::ImageMenuItem::set_accel_group ( const Glib::RefPtr<AccelGroup>&  accel_group  ) 

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.

void Gtk::ImageMenuItem::set_use_stock ( bool  use_stock = true  ) 


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:

Generated for gtkmm 2.4 by Doxygen 1.5.6 © 1997-2001