gtk.MenuBar

class MenuBar : gtk.MenuShell.MenuShell;
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.

protected GtkMenuBar* gtkMenuBar ;
the main Gtk struct

GtkMenuBar* getMenuBarStruct ();
Get the main Gtk struct

protected void* getStruct ();
the main Gtk struct as a void*

this(GtkMenuBar* gtkMenuBar, bool ownedRef = false);
Sets our main struct and passes it to the parent class.

Menu append (string label, bool rightJustify = false);
void append (MenuItem item);
static GType getType ();
this();
Creates a new #GtkMenuBar

Returns:
the new menu bar, as a #GtkWidget

Throws:
ConstructionException GTK+ fails to create the object.

this(MenuModel 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.

Params:
MenuModel model a #GMenuModel

Returns:
a new #GtkMenuBar

Since:
3.4

Throws:
ConstructionException GTK+ fails to create the object.

GtkPackDirection getChildPackDirection ();
Retrieves the current child pack direction of the menubar. See gtk_menu_bar_set_child_pack_direction().

Returns:
the child pack direction

Since:
2.8

GtkPackDirection getPackDirection ();
Retrieves the current pack direction of the menubar. See gtk_menu_bar_set_pack_direction().

Returns:
the pack direction

Since:
2.8

void setChildPackDirection (GtkPackDirection childPackDir);
Sets how widgets should be packed inside the children of a menubar.

Params:
GtkPackDirection childPackDir a new #GtkPackDirection

Since:
2.8

void setPackDirection (GtkPackDirection packDir);
Sets how items should be packed inside a menubar.

Params:
GtkPackDirection packDir a new #GtkPackDirection

Since:
2.8

Page was generated with on Sun Apr 23 22:52:56 2017