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 = GtkBox.html
47 * - GtkWidget* -> Widget
53 private import gtk
.gtktypes
;
55 private import lib
.gtk
;
57 private import gtk
.Widget
;
61 * GtkBox is an abstract widget which encapsulates functionallity for a
62 * particular kind of container, one that organizes a variable number of
63 * widgets into a rectangular area. GtkBox currently has two derived
64 * classes, GtkHBox and GtkVBox.
65 * The rectangular area of a GtkBox is organized into either a single row
66 * or a single column of child widgets depending upon whether the box is
67 * of type GtkHBox or GtkVBox, respectively. Thus, all children of a
68 * GtkBox are allocated one dimension in common, which is the height of a
69 * row, or the width of a column.
70 * GtkBox uses a notion of packing. Packing refers to
71 * adding widgets with reference to a particular position in a
72 * GtkContainer. For a GtkBox, there are two reference positions: the
73 * start and the end of the box. For a
74 * GtkVBox, the start is defined as the top of the box and the end is
75 * defined as the bottom. For a GtkHBox the start is defined as the
76 * left side and the end is defined as the right side.
77 * Use repeated calls to gtk_box_pack_start() to pack widgets into a
78 * GtkBox from start to end. Use gtk_box_pack_end() to add widgets from
79 * end to start. You may intersperse these calls and add widgets from
80 * both ends of the same GtkBox.
81 * Use gtk_box_pack_start_defaults() or gtk_box_pack_end_defaults()
82 * to pack widgets into a GtkBox if you do not need to specify the
84 * padding attributes of the child to be
86 * Because GtkBox is a GtkContainer, you may also use
87 * gtk_container_add() to insert widgets into the box, and they will be
88 * packed as if with gtk_box_pack_start_defaults(). Use
89 * gtk_container_remove() to remove widgets from the GtkBox.
90 * Use gtk_box_set_homogeneous() to specify whether or not all children
91 * of the GtkBox are forced to get the same amount of space.
92 * Use gtk_box_set_spacing() to determine how much space will be
93 * minimally placed between all children in the GtkBox.
94 * Use gtk_box_reorder_child() to move a GtkBox child to a different
96 * Use gtk_box_set_child_packing() to reset the
98 * and padding attributes of any GtkBox child.
99 * Use gtk_box_query_child_packing() to query these fields.
101 private import gtk
.Container
;
102 public class Box
: Container
105 /** the main Gtk struct */
106 protected GtkBox
* gtkBox
;
109 public GtkBox
* getBoxStruct()
115 /** the main Gtk struct as a void* */
116 protected void* getStruct()
118 return cast(void*)gtkBox
;
122 * Sets our main struct and passes it to the parent class
124 public this (GtkBox
* gtkBox
)
126 super(cast(GtkContainer
*)gtkBox
);
127 this.gtkBox
= gtkBox
;
136 * Adds child to box, packed with reference to the start of box. The
137 * child is packed after any other child packed with reference to the
142 * the GtkWidget to be added to box.
144 * TRUE if the new child is to be given extra space allocated to
145 * box. The extra space will be divided evenly between all children of
146 * box that use this option.
148 * TRUE if space given to child by the expand option is
149 * actually allocated to child, rather than just padding it. This
150 * parameter has no effect if expand is set to FALSE. A child is
151 * always allocated the full height of a GtkHBox and the full width of a
152 * GtkVBox. This option affects the other dimension.
154 * extra space in pixels to put between this child and its
155 * neighbors, over and above the global amount specified by
156 * spacing in GtkBox. If child is a
157 * widget at one of the reference ends of box, then padding pixels are also put
158 * between child and the reference edge of box.
160 public void packStart(Widget child
, int expand
, int fill
, uint padding
)
162 // void gtk_box_pack_start (GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding);
163 gtk_box_pack_start(gtkBox
, (child
is null) ?
null : child
.getWidgetStruct(), expand
, fill
, padding
);
167 * Adds child to box, packed with reference to the end of box. The
168 * child is packed after (away from end of) any other child packed with reference to the
173 * the GtkWidget to be added to box.
175 * TRUE if the new child is to be given extra space allocated to
176 * box. The extra space will be divided evenly between all children of
177 * box that use this option.
179 * TRUE if space given to child by the expand option is
180 * actually allocated to child, rather than just padding it. This
181 * parameter has no effect if expand is set to FALSE. A child is
182 * always allocated the full height of a GtkHBox and the full width of a
183 * GtkVBox. This option affects the other dimension.
185 * extra space in pixels to put between this child and its
186 * neighbors, over and above the global amount specified by
187 * spacing in GtkBox. If child is a
188 * widget at one of the reference ends of box, then padding pixels are also put
189 * between child and the reference edge of box.
191 public void packEnd(Widget child
, int expand
, int fill
, uint padding
)
193 // void gtk_box_pack_end (GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding);
194 gtk_box_pack_end(gtkBox
, (child
is null) ?
null : child
.getWidgetStruct(), expand
, fill
, padding
);
198 * Adds widget to box, packed with reference to the start of box. The
199 * child is packed after any other child packed with reference to the
201 * Parameters for how to pack the child widget,
203 * and padding in GtkBoxChild, are given their default
204 * values, TRUE, TRUE, and 0, respectively.
208 * the GtkWidget to be added to box.
210 public void packStartDefaults(Widget widget
)
212 // void gtk_box_pack_start_defaults (GtkBox *box, GtkWidget *widget);
213 gtk_box_pack_start_defaults(gtkBox
, (widget
is null) ?
null : widget
.getWidgetStruct());
217 * Adds widget to box, packed with reference to the end of box. The
218 * child is packed after (away from end of) any other child packed with
219 * reference to the end of box.
220 * Parameters for how to pack the child widget,
222 * and padding in GtkBoxChild, are given their default
223 * values, TRUE, TRUE, and 0, respectively.
227 * the GtkWidget to be added to box.
229 public void packEndDefaults(Widget widget
)
231 // void gtk_box_pack_end_defaults (GtkBox *box, GtkWidget *widget);
232 gtk_box_pack_end_defaults(gtkBox
, (widget
is null) ?
null : widget
.getWidgetStruct());
236 * Returns whether the box is homogeneous (all children are the
237 * same size). See gtk_box_set_homogeneous().
241 * TRUE if the box is homogeneous.
243 public int getHomogeneous()
245 // gboolean gtk_box_get_homogeneous (GtkBox *box);
246 return gtk_box_get_homogeneous(gtkBox
);
250 * Sets the homogeneous field of
251 * GtkBox, controlling whether or not all children of box are
252 * given equal space in the box.
256 * a boolean value, TRUE to create equal allotments,
257 * FALSE for variable allotments.
259 public void setHomogeneous(int homogeneous
)
261 // void gtk_box_set_homogeneous (GtkBox *box, gboolean homogeneous);
262 gtk_box_set_homogeneous(gtkBox
, homogeneous
);
266 * Gets the value set by gtk_box_set_spacing().
270 * spacing between children
272 public int getSpacing()
274 // gint gtk_box_get_spacing (GtkBox *box);
275 return gtk_box_get_spacing(gtkBox
);
279 * Sets the spacing field of GtkBox,
280 * which is the number of pixels to place between children of box.
284 * the number of pixels to put between children.
286 public void setSpacing(int spacing
)
288 // void gtk_box_set_spacing (GtkBox *box, gint spacing);
289 gtk_box_set_spacing(gtkBox
, spacing
);
293 * Moves child to a new position in the list of box children. The
294 * list is the children field of
295 * GtkBox, and contains both widgets packed GTK_PACK_START as
296 * well as widgets packed GTK_PACK_END, in the order that these widgets
298 * A widget's position in the box children list determines where the
299 * widget is packed into box. A child widget at some position in the
300 * list will be packed just after all other widgets of the same packing
301 * type that appear earlier in the list.
305 * the GtkWidget to move.
307 * the new position for child in the
308 * children list of GtkBox, starting
309 * from 0. If negative, indicates the end of the list.
311 public void reorderChild(Widget child
, int position
)
313 // void gtk_box_reorder_child (GtkBox *box, GtkWidget *child, gint position);
314 gtk_box_reorder_child(gtkBox
, (child
is null) ?
null : child
.getWidgetStruct(), position
);
318 * Returns information about how child is packed into box.
322 * the GtkWidget of the child to query.
324 * the returned value of the expand
325 * field in GtkBoxChild.
327 * the returned value of the fill field
330 * the returned value of the padding
331 * field in GtkBoxChild.
333 * the returned value of the pack
334 * field in GtkBoxChild.
336 public void queryChildPacking(Widget child
, int* expand
, int* fill
, uint* padding
, GtkPackType
* packType
)
338 // void gtk_box_query_child_packing (GtkBox *box, GtkWidget *child, gboolean *expand, gboolean *fill, guint *padding, GtkPackType *pack_type);
339 gtk_box_query_child_packing(gtkBox
, (child
is null) ?
null : child
.getWidgetStruct(), expand
, fill
, padding
, packType
);
343 * Sets the way child is packed into box.
347 * the GtkWidget of the child to set.
349 * the new value of the expand field
352 * the new value of the fill field in
355 * the new value of the padding
356 * field in GtkBoxChild.
358 * the new value of the pack field
361 * The "homogeneous" property
362 * "homogeneous" gboolean : Read / Write
363 * Whether the children should all be the same size.
364 * Default value: FALSE
366 public void setChildPacking(Widget child
, int expand
, int fill
, uint padding
, GtkPackType packType
)
368 // void gtk_box_set_child_packing (GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding, GtkPackType pack_type);
369 gtk_box_set_child_packing(gtkBox
, (child
is null) ?
null : child
.getWidgetStruct(), expand
, fill
, padding
, packType
);