[ CCode ( has_construct_function = false , type = "GtkWidget*" ) ]
public ImageMenuItem.from_stock (string stock_id, AccelGroup? accel_group)
Creates a new ImageMenuItem containing the image and text from a stock item.
Use MenuItem.with_mnemonic instead.
Some stock ids have preprocessor macros like OK and APPLY.
If you want this menu item to have changeable accelerators, then pass in null for accel_group. Next call set_accel_path with an appropriate path for the menu item, use lookup to look up the standard accelerator for the stock item, and if one is found, call add_entry to register it.
stock_id |
the name of the stock item. |
accel_group |
the AccelGroup to add the menu items accelerator to, or null. |
a new ImageMenuItem. |