1
2@c %start of fragment
3
4@node GtkBox
5@chapter GtkBox
6Base class for box containers
7
8@section Overview
9GtkBox is an abstract widget which encapsulates functionallity for a particular
10kind of container, one that organizes a variable number of widgets into a
11rectangular area. GtkBox currently has two derived classes, @code{<gtk-hbox>}
12and @code{<gtk-vbox>}.
13
14The rectangular area of a GtkBox is organized into either a single row or a
15single column of child widgets depending upon whether the box is of type
16@code{<gtk-hbox>} or @code{<gtk-vbox>}, respectively. Thus, all children of a
17GtkBox are allocated one dimension in common, which is the height of a row, or
18the width of a column.
19
20GtkBox uses a notion of @emph{packing}. Packing refers to adding widgets with
21reference to a particular position in a @code{<gtk-container>}. For a GtkBox,
22there are two reference positions: the @emph{start} and the @emph{end} of the
23box. For a @code{<gtk-vbox>}, the start is defined as the top of the box and the
24end is defined as the bottom. For a @code{<gtk-hbox>} the start is defined as
25the left side and the end is defined as the right side.
26
27Use repeated calls to @code{gtk-box-pack-start} to pack widgets into a GtkBox
28from start to end. Use @code{gtk-box-pack-end} to add widgets from end to start.
29You may intersperse these calls and add widgets from both ends of the same
30GtkBox.
31
32Use @code{gtk-box-pack-start-defaults} or @code{gtk-box-pack-end-defaults} to
33pack widgets into a GtkBox if you do not need to specify the , , or attributes
34of the child to be added.
35
36Because GtkBox is a @code{<gtk-container>}, you may also use
37@code{gtk-container-add} to insert widgets into the box, and they will be packed
38as if with @code{gtk-box-pack-start-defaults}. Use @code{gtk-container-remove}
39to remove widgets from the GtkBox.
40
41Use @code{gtk-box-set-homogeneous} to specify whether or not all children of the
42GtkBox are forced to get the same amount of space.
43
44Use @code{gtk-box-set-spacing} to determine how much space will be minimally
45placed between all children in the GtkBox.
46
47Use @code{gtk-box-reorder-child} to move a GtkBox child to a different place in
48the box.
49
50Use @code{gtk-box-set-child-packing} to reset the , , and attributes of any
51GtkBox child. Use @code{gtk-box-query-child-packing} to query these fields.
52
53@section Usage
54@include defuns-gtkbox.xml.texi
55
56@c %end of fragment
57