PopoverBin#
Added in version 4.22.
Superclasses: Widget, InitiallyUnowned, Object
Implemented Interfaces: 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#
Methods#
- class PopoverBin
-
Retrieves the menu model set using
set_menu_model.Added in version 4.22.
- get_popover() Popover | None#
Retrieves the
GtkPopoverset usingset_popover.Added in version 4.22.
- popup() None#
Presents the popover to the user.
Use
set_popoverorset_menu_modelto define the popover.See:
popdownAdded in version 4.22.
- set_child(child: Widget | None = None) None#
Sets the child of the popover bin.
Added in version 4.22.
- Parameters:
child – the child of the popover bin
- set_handle_input(handle_input: bool) None#
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.
Added in version 4.22.
- Parameters:
handle_input – whether to handle input
Sets the menu model used to create the popover that will be presented when calling
popup.If
modelisNULL, the popover will be unset.A
Popoverwill be created from the menu model withnew_from_model. Actions will be connected as documented for this function.If
popoveris already set, it will be dissociated from the popover bin, and the property is set toNULL.See:
set_popoverAdded in version 4.22.
- Parameters:
model – a menu model
- set_popover(popover: Popover | None = None) None#
Sets the
GtkPopoverthat will be presented when callingpopup.If
popoverisNULL, the popover will be unset.If
menu_modelis set before calling this function, then the menu model property will be unset.See:
set_menu_modelAdded in version 4.22.
- Parameters:
popover – a
GtkPopover
Properties#
- class PopoverBin
-
The type of the None singleton.
Added in version 4.22.