Sets our main struct and passes it to the parent class.
Creates a new popover to point to @relative_to
Creates a #GtkPopover and populates it according to @model. The popover is pointed to the @relative_to widget.
Establishes a binding between a #GtkPopover and a #GMenuModel.
Gets the widget that should be set as the default while the popover is shown.
Returns whether the popover is modal, see gtk_popover_set_modal to see the implications of this.
If a rectangle to point to has been set, this function will return %TRUE and fill in @rect with such rectangle, otherwise it will return %FALSE and fill in @rect with the attached widget coordinates.
Get the main Gtk struct
Returns the preferred position of @popover.
Returns the widget @popover is currently attached to
the main Gtk struct as a void*
Returns whether show/hide transitions are enabled on this popover.
Sets the widget that should be set as default widget while the popover is shown (see gtk_window_set_default()). #GtkPopover remembers the previous default widget and reestablishes it when the popover is dismissed.
Sets whether @popover is modal, a modal popover will grab all input within the toplevel and grab the keyboard focus on it when being displayed. Clicking outside the popover area or pressing Esc will dismiss the popover and ungrab input.
Sets the rectangle that @popover will point to, in the coordinate space of the widget @popover is attached to, see gtk_popover_set_relative_to().
Sets the preferred position for @popover to appear. If the @popover is currently visible, it will be immediately updated.
Sets a new widget to be attached to @popover. If @popover is visible, the position will be updated.
Sets whether show/hide transitions are enabled on this popover
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Gets the child of the #GtkBin, or %NULL if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.
GtkPopover is a bubble-like context window, primarily meant to provide context-dependent information or options. Popovers are attached to a widget, passed at construction time on gtk_popover_new(), or updated afterwards through gtk_popover_set_relative_to(), by default they will point to the whole widget area, although this behavior can be changed through gtk_popover_set_pointing_to().
The position of a popover relative to the widget it is attached to can also be changed through gtk_popover_set_position().
By default, #GtkPopover performs a GTK+ grab, in order to ensure input events get redirected to it while it is shown, and also so the popover is dismissed in the expected situations (clicks outside the popover, or the Esc key being pressed). If no such modal behavior is desired on a popover, gtk_popover_set_modal() may be called on it to tweak its behavior.
GtkPopover as menu replacement
GtkPopover is often used to replace menus. To facilitate this, it supports being populated from a #GMenuModel, using gtk_popover_new_from_model(). In addition to all the regular menu model features, this function supports rendering sections in the model in a more compact form, as a row of icon buttons instead of menu items.
To use this rendering, set the ”display-hint” attribute of the section to ”horizontal-buttons” and set the icons of your items with the ”verb-icon” attribute.
|[ <section> <attribute name="display-hint">horizontal-buttons</attribute> <item> <attribute name="label">Cut</attribute> <attribute name="action">app.cut</attribute> <attribute name="verb-icon">edit-cut-symbolic</attribute> </item> <item> <attribute name="label">Copy</attribute> <attribute name="action">app.copy</attribute> <attribute name="verb-icon">edit-copy-symbolic</attribute> </item> <item> <attribute name="label">Paste</attribute> <attribute name="action">app.paste</attribute> <attribute name="verb-icon">edit-paste-symbolic</attribute> </item> </section> ]|