Menu.newFromModel

gtk.menu.Menu newFromModel(gio.menu_model.MenuModel model) static nothrow

Creates a #GtkMenu and populates it with menu items and submenus according to model.

The created menu items are connected to actions found in the #GtkApplicationWindow to which the menu belongs - typically by means of being attached to a widget (see gtk.menu.Menu.attachToWidget) that is contained within the #GtkApplicationWindows widget hierarchy.

Actions can also be added using gtk.widget.Widget.insertActionGroup on the menu's attach widget or on any of its parent widgets.

Parameters

modela #GMenuModel

Returns

a new #GtkMenu