Sets our main struct and passes it to the parent class.
Creates a new popover to point to relative_to
Creates a gtk.Popover and populates it according to model. The popover is pointed to the relative_to widget.
This signal is emitted when the popover is dismissed either through API or user interaction.
Establishes a binding between a gtk.Popover and a gio.MenuModel
Returns the constraint for placing this popover. See Popover.setConstrainTo.
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.
Pops popover down.This is different than a Widget.hide call in that it shows the popover with a transition. If you want to hide the popover without a transition, use Widget.hide.
Pops popover up. This is different than a Widget.show call in that it shows the popover with a transition. If you want to show the popover without a transition, use Widget.show.
Sets a constraint for positioning this popover.
Sets the widget that should be set as default widget while the popover is shown (see Window.setDefault). gtk.Popover 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 Popover.setRelativeTo.
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 gtk.Bin, 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 Popover.new, or updated afterwards through Popover.setRelativeTo, by default they will point to the whole widget area, although this behavior can be changed through Popover.setPointingTo.
The position of a popover relative to the widget it is attached to can also be changed through Popover.setPosition.
By default, gtk.Popover 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, Popover.setModal 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 gio.MenuModel, using Popover.newFromModel. 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>