2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkMenuBar.html
50 * - GtkMenuItem* -> MenuItem
51 * - GtkWidget* -> Widget
57 private import gtk
.gtktypes
;
59 private import lib
.gtk
;
61 private import gtk
.Widget
;
62 private import gtk
.Menu
;;
63 private import gtk
.MenuItem
;;
67 * The GtkMenuBar is a subclass of GtkMenuShell which contains one to many GtkMenuItem. The result is a standard menu bar which can hold many menu items. GtkMenuBar allows for a shadow type to be set for aesthetic purposes. The shadow types are defined in the gtk_menu_bar_set_shadow_type function.
69 private import gtk
.MenuShell
;
70 public class MenuBar
: MenuShell
73 /** the main Gtk struct */
74 protected GtkMenuBar
* gtkMenuBar
;
77 public GtkMenuBar
* getMenuBarStruct()
83 /** the main Gtk struct as a void* */
84 protected void* getStruct()
86 return cast(void*)gtkMenuBar
;
90 * Sets our main struct and passes it to the parent class
92 public this (GtkMenuBar
* gtkMenuBar
)
94 super(cast(GtkMenuShell
*)gtkMenuBar
);
95 this.gtkMenuBar
= gtkMenuBar
;
98 Menu
append(char[] label
, bool rightJustify
=false)
100 MenuItem item
= new MenuItem(label
);
102 item
.setRightJustified(rightJustify
);
103 Menu menu
= new Menu();
104 item
.setSubmenu(menu
);
108 public void append(Widget widget
)
110 super.append(widget
);
118 * Creates the new GtkMenuBar
124 // GtkWidget* gtk_menu_bar_new (void);
125 this(cast(GtkMenuBar
*)gtk_menu_bar_new() );
133 * Sets how items should be packed inside a menubar.
137 * a new GtkPackDirection.
140 public void setPackDirection(GtkPackDirection packDir
)
142 // void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar, GtkPackDirection pack_dir);
143 gtk_menu_bar_set_pack_direction(gtkMenuBar
, packDir
);
147 * Retrieves the current pack direction of the menubar. See
148 * gtk_menu_bar_set_pack_direction().
155 public GtkPackDirection
getPackDirection()
157 // GtkPackDirection gtk_menu_bar_get_pack_direction (GtkMenuBar *menubar);
158 return gtk_menu_bar_get_pack_direction(gtkMenuBar
);
162 * Sets how widgets should be packed inside the children of a menubar.
166 * a new GtkPackDirection.
169 public void setChildPackDirection(GtkPackDirection childPackDir
)
171 // void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar, GtkPackDirection child_pack_dir);
172 gtk_menu_bar_set_child_pack_direction(gtkMenuBar
, childPackDir
);
176 * Retrieves the current child pack direction of the menubar. See
177 * gtk_menu_bar_set_child_pack_direction().
181 * the child pack direction
184 * The "child-pack-direction" property
185 * "child-pack-direction" GtkPackDirection : Read / Write
186 * The pack direction of the menubar. It determines how
187 * the widgets contained in child menuitems are arranged.
188 * Default value: GTK_PACK_DIRECTION_LTR
191 public GtkPackDirection
getChildPackDirection()
193 // GtkPackDirection gtk_menu_bar_get_child_pack_direction (GtkMenuBar *menubar);
194 return gtk_menu_bar_get_child_pack_direction(gtkMenuBar
);