Gio.MenuItem.new_submenu

function new_submenu(label: String, submenu: Gio.MenuModel): Gio.MenuItem {
    // Gjs wrapper for g_menu_item_new_submenu()
}
  

Creates a new Gio.MenuItem representing a submenu.

This is a convenience API around Gio.MenuItem.new and Gio.MenuItem.prototype.set_submenu.

Since 2.32

label

the section label, or null

submenu

a Gio.MenuModel with the items of the submenu

Returns

a new Gio.MenuItem