| GTK+ 3 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Style Properties | ||||
#include <gtk/gtk.h> struct GtkMenuBar; GtkWidget * gtk_menu_bar_new (void); enum GtkPackDirection; void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar,GtkPackDirection pack_dir); GtkPackDirection gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar); void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar,GtkPackDirection child_pack_dir); GtkPackDirection gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar);
GObject
+----GInitiallyUnowned
+----GtkWidget
+----GtkContainer
+----GtkMenuShell
+----GtkMenuBar
"child-pack-direction" GtkPackDirection : Read / Write "pack-direction" GtkPackDirection : Read / Write
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.
GtkWidget * gtk_menu_bar_new (void);
Creates a new GtkMenuBar
Returns : |
the new menu bar, as a GtkWidget |
typedef enum {
GTK_PACK_DIRECTION_LTR,
GTK_PACK_DIRECTION_RTL,
GTK_PACK_DIRECTION_TTB,
GTK_PACK_DIRECTION_BTT
} GtkPackDirection;
Determines how widgets should be packed insided menubars and menuitems contained in menubars.
void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar,GtkPackDirection pack_dir);
Sets how items should be packed inside a menubar.
|
a GtkMenuBar |
|
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().
|
a GtkMenuBar |
Returns : |
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.
|
a GtkMenuBar |
|
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().
|
a GtkMenuBar |
Returns : |
the child pack direction |
Since 2.8
"child-pack-direction" property"child-pack-direction" GtkPackDirection : Read / Write
The child pack direction of the menubar. It determines how the widgets contained in child menuitems are arranged.
Default value: GTK_PACK_DIRECTION_LTR
Since 2.8
"pack-direction" property"pack-direction" GtkPackDirection : Read / Write
The pack direction of the menubar. It determines how menuitems are arranged in the menubar.
Default value: GTK_PACK_DIRECTION_LTR
Since 2.8
"internal-padding" style property "internal-padding" gint : Read
Amount of border space between the menubar shadow and the menu items.
Allowed values: >= 0
Default value: 1
"shadow-type" style property"shadow-type" GtkShadowType : Read
Style of bevel around the menubar.
Default value: GTK_SHADOW_OUT