Constructor
GtkMenunew_from_model
since: 3.4
Declaration [src]
GtkWidget*
gtk_menu_new_from_model (
GMenuModel* model
)
Description [src]
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_attach_to_widget())
that is contained within the GtkApplicationWindows widget hierarchy.
Actions can also be added using gtk_widget_insert_action_group() on the menu’s
attach widget or on any of its parent widgets.
Available since: 3.4
Parameters
model-
Type:
GMenuModelA
GMenuModel.The data is owned by the caller of the function.
Return value
Type: GtkWidget
A new GtkMenu.
| The data is owned by the called function. |