GtkPopoverMenuBar

GtkPopoverMenuBar — A menu bar with popovers

Properties

GMenuModel * menu-model Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkPopoverMenuBar

Implemented Interfaces

GtkPopoverMenuBar implements AtkImplementorIface, GtkBuildable and GtkConstraintTarget.

Includes

#include <gtk/gtk.h>

Description

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

1
2
3
4
5
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.

Functions

gtk_popover_menu_bar_new_from_model ()

GtkWidget *
gtk_popover_menu_bar_new_from_model (GMenuModel *model);

Creates a GtkPopoverMenuBar from a GMenuModel.

Parameters

model

a GMenuModel, or NULL.

[allow-none]

Returns

a new GtkPopoverMenuBar


gtk_popover_menu_bar_set_menu_model ()

void
gtk_popover_menu_bar_set_menu_model (GtkPopoverMenuBar *bar,
                                     GMenuModel *model);

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

Parameters

bar

a GtkPopoverMenuBar

 

model

a GMenuModel, or NULL.

[allow-none]

gtk_popover_menu_bar_get_menu_model ()

GMenuModel *
gtk_popover_menu_bar_get_menu_model (GtkPopoverMenuBar *bar);

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

Parameters

Returns

a GMenuModel.

[transfer none]

Types and Values

GtkPopoverMenuBar

typedef struct _GtkPopoverMenuBar GtkPopoverMenuBar;

Property Details

The “menu-model” property

  “menu-model”               GMenuModel *

The GMenuModel from which the menu bar is created.

The model should only contain submenus as toplevel elements.

Owner: GtkPopoverMenuBar

Flags: Read / Write

See Also

GtkPopover, GtkPopoverMenu, GMenuModel