GtkPopoverMenu

A popover that shows a menu model.

Preview

CSS Node Tree

popover.background.menu
  ├── arrow
  └── contents
      └── scrolledwindow
          └── viewport
              └── stack
                  └── box.vertical
                      ├── modelbutton.flat
                      │   ├── label
                      │   └── [accelerator]
                      ├── separator
                      └── modelbutton.flat

Props

Prop

Type

A menu model is a list of sections, each a list of items:

Prop

Type

Behavior

  • Pass the model to a GtkMenuButton as menuModel, or a GtkPopoverMenu as its popover.
  • When the menu opens, its first item takes the focus. Up/Down and Tab move between the items, Enter or Space activates one, and Escape closes the menu.
  • An underscore in a label marks its mnemonic: in the open menu, the key alone activates the item. The underline shows once the keyboard moves through the menu.
  • An item's accel activates it while the menu is open. Browsers keep some shortcuts, such as Ctrl+N, for themselves.
  • A menu taller than the window scrolls.

GTK4 Documentation →

On this page