GtkMenuBar — A subclass of GtkMenuShell which holds GtkMenuItem widgets
GtkPackDirection | child-pack-direction | Read / Write |
GtkPackDirection | pack-direction | Read / Write |
int | internal-padding | Read |
GtkShadowType | shadow-type | Read |
struct | GtkMenuBar |
enum | GtkPackDirection |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkMenuShell ╰── GtkMenuBar
GtkMenuBar implements AtkImplementorIface and GtkBuildable.
#include <gtk/gtk.h>
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.
GtkMenuBar has a single CSS node with name menubar.
GtkWidget *
gtk_menu_bar_new (void
);
Creates a new GtkMenuBar
the new menu bar, as a GtkWidget
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.
model | a GMenuModel |
a new GtkMenuBar
Since: 3.4
void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar
,GtkPackDirection pack_dir
);
Sets how items should be packed inside a menubar.
menubar | ||
pack_dir | a new GtkPackDirection |
Since: 2.8
GtkPackDirection
gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar
);
Retrieves the current pack direction of the menubar. See gtk_menu_bar_set_pack_direction()
.
menubar |
the pack direction
Since: 2.8
void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar
,GtkPackDirection child_pack_dir
);
Sets how widgets should be packed inside the children of a menubar.
menubar | ||
child_pack_dir | a new GtkPackDirection |
Since: 2.8
GtkPackDirection
gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar
);
Retrieves the current child pack direction of the menubar. See gtk_menu_bar_set_child_pack_direction()
.
menubar |
the child pack direction
Since: 2.8
struct GtkMenuBar;
Determines how widgets should be packed inside menubars and menuitems contained in menubars.
GTK_PACK_DIRECTION_LTR | Widgets are packed left-to-right | |
GTK_PACK_DIRECTION_RTL | Widgets are packed right-to-left | |
GTK_PACK_DIRECTION_TTB | Widgets are packed top-to-bottom | |
GTK_PACK_DIRECTION_BTT | Widgets are packed bottom-to-top |
“child-pack-direction”
property“child-pack-direction” GtkPackDirection
The child pack direction of the menubar. It determines how the widgets contained in child menuitems are arranged.
Owner: GtkMenuBar
Flags: Read / Write
Default value: GTK_PACK_DIRECTION_LTR
Since: 2.8
“pack-direction”
property“pack-direction” GtkPackDirection
The pack direction of the menubar. It determines how menuitems are arranged in the menubar.
Owner: GtkMenuBar
Flags: Read / Write
Default value: GTK_PACK_DIRECTION_LTR
Since: 2.8
“internal-padding”
style property“internal-padding” int
Amount of border space between the menubar shadow and the menu items
GtkMenuBar:internal-padding
has been deprecated since version 3.8 and should not be used in newly-written code.
use the standard padding CSS property (through objects like GtkStyleContext and GtkCssProvider); the value of this style property is ignored.
Owner: GtkMenuBar
Flags: Read
Allowed values: >= 0
Default value: 0
“shadow-type”
style property“shadow-type” GtkShadowType
The style of the shadow around the menubar.
GtkMenuBar:shadow-type
has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS to determine the shadow; the value of this style property is ignored.
Owner: GtkMenuBar
Flags: Read
Default value: GTK_SHADOW_OUT
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkMenuBar.html