Gtk.PopoverBin¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (18), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (7), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.PopoverBin(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A single child container with a popover.
You should use
GtkPopoverBinwhenever you need to present a [class`Gtk`.Popover] to the user.- Actions
GtkPopoverBindefines themenu.popupaction, which can be activated to present the popover to the user.- CSS nodes
GtkPopoverBinhas a single CSS node with the namepopoverbin.New in version 4.22.
- classmethod new()[source]¶
- Returns:
the newly created popover bin
- Return type:
Creates a new popover bin widget.
New in version 4.22.
- get_child()[source]¶
- Returns:
the child widget
- Return type:
Gtk.WidgetorNone
Retrieves the child widget of the popover bin.
New in version 4.22.
- Returns:
the menu model for the popover
- Return type:
Retrieves the menu model set using [method`Gtk`.PopoverBin.set_menu_model].
New in version 4.22.
- get_popover()[source]¶
- Returns:
a popover widget
- Return type:
Gtk.PopoverorNone
Retrieves the
GtkPopoverset using [method`Gtk`.PopoverBin.set_popover].New in version 4.22.
- popdown()[source]¶
Hides the popover from the user.
See: [method`Gtk`.PopoverBin.popup]
New in version 4.22.
- popup()[source]¶
Presents the popover to the user.
Use [method`Gtk`.PopoverBin.set_popover] or [method`Gtk`.PopoverBin.set_menu_model] to define the popover.
See: [method`Gtk`.PopoverBin.popdown]
New in version 4.22.
- set_child(child)[source]¶
- Parameters:
child (
Gtk.WidgetorNone) – the child of the popover bin
Sets the child of the popover bin.
New in version 4.22.
- set_handle_input(handle_input)[source]¶
- Parameters:
handle_input (
bool) – whether to 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.
New in version 4.22.
- Parameters:
model (
Gio.MenuModelorNone) – a menu model
Sets the menu model used to create the popover that will be presented when calling [method`Gtk`.PopoverBin.popup].
If model is
NULL, the popover will be unset.A [class`Gtk`.Popover] will be created from the menu model with [ctor`Gtk`.PopoverMenu.new_from_model]. Actions will be connected as documented for this function.
If [property`Gtk`.PopoverBin:popover] is already set, it will be dissociated from the popover bin, and the property is set to
NULL.See: [method`Gtk`.PopoverBin.set_popover]
New in version 4.22.
- set_popover(popover)[source]¶
- Parameters:
popover (
Gtk.PopoverorNone) – aGtkPopover
Sets the
GtkPopoverthat will be presented when calling [method`Gtk`.PopoverBin.popup].If popover is
NULL, the popover will be unset.If [property`Gtk`.PopoverBin:menu-model] is set before calling this function, then the menu model property will be unset.
See: [method`Gtk`.PopoverBin.set_menu_model]
New in version 4.22.
Property Details¶
- Gtk.PopoverBin.props.child¶
- Name:
child- Type:
- Default Value:
- Flags:
The child widget of the popover bin.
New in version 4.22.
- Gtk.PopoverBin.props.handle_input¶
- Name:
handle-input- Type:
- Default Value:
- Flags:
Whether the popover bin will handle input to trigger the popup.
New in version 4.22.
- Name:
menu-model- Type:
- Default Value:
- Flags:
The
GMenuModelfrom which the popup will be created.See [method`Gtk`.PopoverBin.set_menu_model] for the interaction with the [property`Gtk`.PopoverBin:popover] property.
New in version 4.22.
- Gtk.PopoverBin.props.popover¶
- Name:
popover- Type:
- Default Value:
- Flags:
The
GtkPopoverthat will be popped up when calling [method`Gtk`.PopoverBin.popup].New in version 4.22.