Gtk.Menu.new_from_model
function new_from_model(model:Gio.MenuModel):Gtk.Widget { // Gjs wrapper for gtk_menu_new_from_model() }
Creates a Gtk.Menu and populates it with menu items and submenus according to model.
The created menu items are connected to actions found in the Gtk.ApplicationWindow to which the menu belongs - typically by means of being attached to a widget (see Gtk.Menu.prototype.attach_to_widget) that is contained within the #GtkApplicationWindows widget hierarchy.
Since 3.4
- model
- Returns
a new Gtk.Menu