PopoverMenuBar#
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
GtkPopoverMenuBar
presents a horizontal bar of items that pop
up popover menus when clicked.
The only way to create instances of GtkPopoverMenuBar
is
from a GMenuModel
.
CSS nodes#
menubar
├── item[.active]
┊ ╰── popover
╰── item
╰── popover
GtkPopoverMenuBar
has a single CSS node with name menubar, below which
each item has its CSS node, and below that the corresponding popover.
The item whose popover is currently open gets the .active style class.
Accessibility#
GtkPopoverMenuBar
uses the MENU_BAR
role,
the menu items use the MENU_ITEM
role and
the menus use the MENU
role.
Constructors#
Methods#
- class PopoverMenuBar
- add_child(child: Widget, id: str) → bool#
Adds a custom widget to a generated menubar.
For this to work, the menu model of
bar
must have an item with acustom
attribute that matchesid
.- Parameters:
child – the
GtkWidget
to addid – the ID to insert
child
at
- remove_child(child: Widget) → bool#
Removes a widget that has previously been added with
add_child()
.- Parameters:
child – the
GtkWidget
to remove