GtkMenuBar

GtkMenuBar — A subclass of GtkMenuShell which holds GtkMenuItem widgets

Functions

Types and Values

struct GtkMenuBar

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkMenuShell
                    ╰── GtkMenuBar

Implemented Interfaces

GtkMenuBar implements AtkImplementorIface and GtkBuildable.

Includes

#include <gtk/gtk.h>

Description

The GtkMenuBar is a subclass of GtkMenuShell which contains one or more GtkMenuItems. The result is a standard menu bar which can hold many menu items.

CSS nodes

GtkMenuBar has a single CSS node with name menubar.

Functions

gtk_menu_bar_new ()

GtkWidget *
gtk_menu_bar_new (void);

Creates a new GtkMenuBar

Returns

the new menu bar, as a GtkWidget

gtk_menu_bar_new_from_model ()

GtkWidget *
gtk_menu_bar_new_from_model (GMenuModel *model);

Creates a new GtkMenuBar and populates it with menu items and submenus according to model .

The created menu items are connected to actions found in the GtkApplicationWindow to which the menu bar belongs - typically by means of being contained within the GtkApplicationWindows widget hierarchy.

Parameters

model

a GMenuModel

 

Returns

a new GtkMenuBar

Types and Values

struct GtkMenuBar

struct GtkMenuBar;

See Also

GtkMenuShell, GtkMenu, GtkMenuItem