Top |
Functions
GtkWidget * | gtk_popover_menu_bar_new_from_model () |
void | gtk_popover_menu_bar_set_menu_model () |
GMenuModel * | gtk_popover_menu_bar_get_menu_model () |
gboolean | gtk_popover_menu_bar_add_child () |
gboolean | gtk_popover_menu_bar_remove_child () |
Implemented Interfaces
GtkPopoverMenuBar implements GtkAccessible, GtkBuildable and GtkConstraintTarget.
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.
Accessibility
GtkPopoverMenuBar 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.
Functions
gtk_popover_menu_bar_new_from_model ()
GtkWidget *
gtk_popover_menu_bar_new_from_model (GMenuModel *model
);
Creates a GtkPopoverMenuBar from a GMenuModel.
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.
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.
gtk_popover_menu_bar_add_child ()
gboolean gtk_popover_menu_bar_add_child (GtkPopoverMenuBar *bar
,GtkWidget *child
,const char *id
);
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
.
gtk_popover_menu_bar_remove_child ()
gboolean gtk_popover_menu_bar_remove_child (GtkPopoverMenuBar *bar
,GtkWidget *child
);
Removes a widget that has previously been added with
gtk_popover_menu_bar_add_child()
.