About my projects, examples and tutorials
Gnome::Gtk4::PopoverMenuBar

Gnome::Gtk4::PopoverMenuBar

Description§

Gnome::Gtk4::PopoverMenuBar presents a horizontal bar of items that pop up popover menus when clicked.

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/menubar.png> :width<30\%>

The only way to create instances of Gnome::Gtk4::PopoverMenuBar is from a Gnome::Gio::MenuModel.

CSS nodes§

Gnome::Gtk4::PopoverMenuBar 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§

Gnome::Gtk4::PopoverMenuBar uses the GTK_ACCESSIBLE_ROLE_MENU_BAR role, the menu items use the GTK_ACCESSIBLE_ROLE_MENU_ITEM role and the menus use the GTK_ACCESSIBLE_ROLE_MENU role.

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/PopoverMenuBar.png> :width<70\%>

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

new-from-model§

Creates a Gnome::Gtk4::PopoverMenuBar from a Gnome::Gio::MenuModel.

method new-from-model ( N-Object() $model --> Gnome::Gtk4::PopoverMenuBar )
Code

Methods§

add-child§

Adds a custom widget to a generated menubar.

For this to work, the menu model of $bar must have an item with a custom attribute that matches $id.

method add-child ( N-Object() $child, Str $id --> Bool )
Code

Return value; True if $id was found and the widget added.

get-menu-model§

Returns the model from which the contents of $bar are taken.

method get-menu-model (--> N-Object )
Code

Return value; a Gnome::Gio::MenuModel.

remove-child§

Removes a widget that has previously been added with .add-child().

method remove-child ( N-Object() $child --> Bool )
Code

Return value; True if the widget was removed.

set-menu-model§

Sets a menu model from which $bar should take its contents.

method set-menu-model ( N-Object() $model )
Code