Constructor

GtkImageMenuItemnew_from_stock

deprecated: 3.10 

Declaration [src]

GtkWidget*
gtk_image_menu_item_new_from_stock (
  const gchar* stock_id,
  GtkAccelGroup* accel_group
)

Description [src]

Creates a new GtkImageMenuItem containing the image and text from a stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK and #GTK_STOCK_APPLY.

If you want this menu item to have changeable accelerators, then pass in NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an appropriate path for the menu item, use gtk_stock_lookup() to look up the standard accelerator for the stock item, and if one is found, call gtk_accel_map_add_entry() to register it.

Deprecated since: 3.10

Use gtk_menu_item_new_with_mnemonic() instead.

Parameters

stock_id

Type: const gchar*

The name of the stock item.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
accel_group

Type: GtkAccelGroup

The GtkAccelGroup to add the menu items accelerator to, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: GtkWidget

A new GtkImageMenuItem.

The data is owned by the called function.