Gtk.Menu_Bar

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

The Gtk.Menu_Bar.Gtk_Menu_Bar is a subclass of Gtk.Menu_Shell.Gtk_Menu_Shell which contains one or more Gtk_Menu_Items. The result is a standard menu bar which can hold many menu items.

# CSS nodes

GtkMenuBar has a single CSS node with name menubar.

"+"

function "+"
  (Widget : access Gtk_Menu_Bar_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Menu_Bar
Parameters
Interf
Return Value

Child_Pack_Direction_Property

Child_Pack_Direction_Property : constant Gtk.Enums.Property_Gtk_Pack_Direction;

The child pack direction of the menubar. It determines how the widgets contained in child menuitems are arranged.

Get_Child_Pack_Direction

function Get_Child_Pack_Direction
   (Menu_Bar : not null access Gtk_Menu_Bar_Record)
    return Gtk.Enums.Gtk_Pack_Direction

Retrieves the current child pack direction of the menubar. See Gtk.Menu_Bar.Set_Child_Pack_Direction. Since: gtk+ 2.8

Parameters
Menu_Bar
Return Value

the child pack direction

Get_Pack_Direction

function Get_Pack_Direction
   (Menu_Bar : not null access Gtk_Menu_Bar_Record)
    return Gtk.Enums.Gtk_Pack_Direction

Retrieves the current pack direction of the menubar. See Gtk.Menu_Bar.Set_Pack_Direction. Since: gtk+ 2.8

Parameters
Menu_Bar
Return Value

the pack direction

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Menu_Bar

type Gtk_Menu_Bar is access all Gtk_Menu_Bar_Record'Class;

Gtk_Menu_Bar_New

function Gtk_Menu_Bar_New return Gtk_Menu_Bar

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar

Return Value

Gtk_Menu_Bar_New_From_Model

function Gtk_Menu_Bar_New_From_Model
   (Model : not null access Glib.Menu_Model.Gmenu_Model_Record'Class)
    return Gtk_Menu_Bar

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar and populates it with menu items and submenus according to Model. The created menu items are connected to actions found in the Gtk.Application_Window.Gtk_Application_Window to which the menu bar belongs - typically by means of being contained within the Gtk_Application_Windows widget hierarchy. Since: gtk+ 3.4

Parameters
Model

a Glib.Menu_Model.Gmenu_Model

Return Value

Gtk_Menu_Bar_Record

type Gtk_Menu_Bar_Record is new Gtk_Menu_Shell_Record with null record;

Gtk_New

procedure Gtk_New (Menu_Bar : out Gtk_Menu_Bar)

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Menu_Bar

Gtk_New_From_Model

procedure Gtk_New_From_Model
   (Menu_Bar : out Gtk_Menu_Bar;
    Model    : not null access Glib.Menu_Model.Gmenu_Model_Record'Class)

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar and populates it with menu items and submenus according to Model. The created menu items are connected to actions found in the Gtk.Application_Window.Gtk_Application_Window to which the menu bar belongs - typically by means of being contained within the Gtk_Application_Windows widget hierarchy. Since: gtk+ 3.4 Initialize_From_Model does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Menu_Bar
Model

a Glib.Menu_Model.Gmenu_Model

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Menu_Bar_Record, Gtk_Menu_Bar);

Initialize

procedure Initialize
   (Menu_Bar : not null access Gtk_Menu_Bar_Record'Class)

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Menu_Bar

Initialize_From_Model

procedure Initialize_From_Model
   (Menu_Bar : not null access Gtk_Menu_Bar_Record'Class;
    Model    : not null access Glib.Menu_Model.Gmenu_Model_Record'Class)

Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar and populates it with menu items and submenus according to Model. The created menu items are connected to actions found in the Gtk.Application_Window.Gtk_Application_Window to which the menu bar belongs - typically by means of being contained within the Gtk_Application_Windows widget hierarchy. Since: gtk+ 3.4 Initialize_From_Model does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Menu_Bar
Model

a Glib.Menu_Model.Gmenu_Model

Pack_Direction_Property

Pack_Direction_Property : constant Gtk.Enums.Property_Gtk_Pack_Direction;

The pack direction of the menubar. It determines how menuitems are arranged in the menubar.

Set_Child_Pack_Direction

procedure Set_Child_Pack_Direction
   (Menu_Bar       : not null access Gtk_Menu_Bar_Record;
    Child_Pack_Dir : Gtk.Enums.Gtk_Pack_Direction)

Sets how widgets should be packed inside the children of a menubar. Since: gtk+ 2.8

Parameters
Menu_Bar
Child_Pack_Dir

a new Gtk.Enums.Gtk_Pack_Direction

Set_Pack_Direction

procedure Set_Pack_Direction
   (Menu_Bar : not null access Gtk_Menu_Bar_Record;
    Pack_Dir : Gtk.Enums.Gtk_Pack_Direction)

Sets how items should be packed inside a menubar. Since: gtk+ 2.8

Parameters
Menu_Bar
Pack_Dir

a new Gtk.Enums.Gtk_Pack_Direction