Gtk.PopoverBin¶
class — extends Widget, Accessible, Buildable, ConstraintTarget
A single child container with a popover.
You should use GtkPopoverBin whenever you need to present a Popover
to the user.
Actions¶
GtkPopoverBin defines the menu.popup action, which can be activated
to present the popover to the user.
CSS nodes¶
GtkPopoverBin has a single CSS node with the name popoverbin.
Constructors¶
new¶
Creates a new popover bin widget.
Methods¶
get_child¶
Retrieves the child widget of the popover bin.
get_handle_input¶
get_menu_model¶
Retrieves the menu model set using PopoverBin.set_menu_model.
get_popover¶
Retrieves the GtkPopover set using PopoverBin.set_popover.
popdown¶
Hides the popover from the user.
See: PopoverBin.popup
popup¶
Presents the popover to the user.
Use PopoverBin.set_popover or
PopoverBin.set_menu_model to define the popover.
See: PopoverBin.popdown
set_child¶
Sets the child of the popover bin.
Parameters:
child— the child of the popover bin
set_handle_input¶
Enables or disables input handling.
If enabled, the popover bin will pop up the popover on right-click or long press, as expected for a context menu.
Parameters:
handle_input— whether to handle input
set_menu_model¶
Sets the menu model used to create the popover that will be
presented when calling PopoverBin.popup.
If model is NULL, the popover will be unset.
A Popover will be created from the menu model with
PopoverMenu.new_from_model. Actions will be connected
as documented for this function.
If PopoverBin.popover is already set, it will be
dissociated from the popover bin, and the property is set to NULL.
Parameters:
model— a menu model
set_popover¶
Sets the GtkPopover that will be presented when calling
PopoverBin.popup.
If popover is NULL, the popover will be unset.
If PopoverBin.menu-model is set before calling
this function, then the menu model property will be unset.
See: PopoverBin.set_menu_model
Parameters:
popover— aGtkPopover
Properties¶
child¶
The child widget of the popover bin.
handle_input¶
Whether the popover bin will handle input to trigger the popup.
menu_model¶
The GMenuModel from which the popup will be created.
See PopoverBin.set_menu_model for the interaction
with the PopoverBin.popover property.
popover¶
The GtkPopover that will be popped up when calling
PopoverBin.popup.