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
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Menu_Bar
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.
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
the child 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
the pack direction
function Get_Type return Glib.GType
type Gtk_Menu_Bar is access all Gtk_Menu_Bar_Record'Class;
function Gtk_Menu_Bar_New return Gtk_Menu_Bar
Creates a new Gtk.Menu_Bar.Gtk_Menu_Bar
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
a Glib.Menu_Model.Gmenu_Model
type Gtk_Menu_Bar_Record is new Gtk_Menu_Shell_Record with null record;
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.
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.
a Glib.Menu_Model.Gmenu_Model
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Menu_Bar_Record, Gtk_Menu_Bar);
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.
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.
a Glib.Menu_Model.Gmenu_Model
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.
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
a new Gtk.Enums.Gtk_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
a new Gtk.Enums.Gtk_Pack_Direction