Sets our main struct and passes it to the parent class.
Creates a new popover menu.
Get the main Gtk struct
the main Gtk struct as a void*
Opens a submenu of the popover. The name must be one of the names given to the submenus of popover with submenu, or "main" to switch back to the main menu.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
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.
Returns the preferred position of popover.
Returns the widget popover is currently attached to
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
This signal is emitted when the popover is dismissed either through API or user interaction.
GtkPopoverMenu is a subclass of gtk.Popover that treats its children like menus and allows switching between them. It is meant to be used primarily together with gtk.ModelButton, but any widget can be used, such as gtk.SpinButton or gtk.Scale In this respect, GtkPopoverMenu is more flexible than popovers that are created from a gio.MenuModel with Popover.newFromModel.
To add a child as a submenu, set the submenu child property to the name of the submenu. To let the user open this submenu, add a gtk.ModelButton whose menu-name property is set to the name you've given to the submenu.
By convention, the first child of a submenu should be a gtk.ModelButton to switch back to the parent menu. Such a button should use the inverted and centered properties to achieve a title-like appearance and place the submenu indicator at the opposite side. To switch back to the main menu, use "main" as the menu name.
Example
|[ <object class="GtkPopoverMenu"> <child> <object class="GtkBox"> <property name="visible">True</property> <property name="margin">10</property> <child> <object class="GtkModelButton"> <property name="visible">True</property> <property name="action-name">win.frob</property> <property name="text" translatable="yes">Frob</property> </object> </child> <child> <object class="GtkModelButton"> <property name="visible">True</property> <property name="menu-name">more</property> <property name="text" translatable="yes">More</property> </object> </child> </object> </child> <child> <object class="GtkBox"> <property name="visible">True</property> <property name="margin">10</property> <child> <object class="GtkModelButton"> <property name="visible">True</property> <property name="action-name">win.foo</property> <property name="text" translatable="yes">Foo</property> </object> </child> <child> <object class="GtkModelButton"> <property name="visible">True</property> <property name="action-name">win.bar</property> <property name="text" translatable="yes">Bar</property> </object> </child> </object> <packing> <property name="submenu">more</property> </packing> </child> </object>