Gtk.ImageMenuItem.new_from_stock

function new_from_stock(stock_id:String, accel_group:Gtk.AccelGroup):Gtk.Widget {
    // Gjs wrapper for gtk_image_menu_item_new_from_stock()
}

Creates a new Gtk.ImageMenuItem 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.set_accel_path with an appropriate path for the menu item, use stock_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 Gtk.AccelGroup to add the menu items accelerator to, or null.

Returns

a new Gtk.ImageMenuItem.