Constructor

GtkPopovernew_from_model

since: 3.12

Declaration [src]

GtkWidget*
gtk_popover_new_from_model (
  GtkWidget* relative_to,
  GMenuModel* model
)

Description [src]

Creates a GtkPopover and populates it according to model. The popover is pointed to the relative_to widget.

The created buttons are connected to actions found in the GtkApplicationWindow to which the popover belongs - typically by means of being attached to a widget that is contained within the GtkApplicationWindows widget hierarchy.

Actions can also be added using gtk_widget_insert_action_group() on the menus attach widget or on any of its parent widgets.

Available since: 3.12

Parameters

relative_to

Type: GtkWidget

GtkWidget the popover is related to.

The argument can be NULL.
The data is owned by the caller of the function.
model

Type: GMenuModel

A GMenuModel.

The data is owned by the caller of the function.

Return value

Type: GtkWidget

The new GtkPopover.

The data is owned by the called function.