
@c %start of fragment

@node GtkBox
@chapter GtkBox
Base class for box containers

@section Overview
GtkBox is an abstract widget which encapsulates functionallity for a particular
kind of container, one that organizes a variable number of widgets into a
rectangular area. GtkBox currently has two derived classes, @code{<gtk-hbox>}
and @code{<gtk-vbox>}.

The rectangular area of a GtkBox is organized into either a single row or a
single column of child widgets depending upon whether the box is of type
@code{<gtk-hbox>} or @code{<gtk-vbox>}, respectively. Thus, all children of a
GtkBox are allocated one dimension in common, which is the height of a row, or
the width of a column.

GtkBox uses a notion of @emph{packing}. Packing refers to adding widgets with
reference to a particular position in a @code{<gtk-container>}. For a GtkBox,
there are two reference positions: the @emph{start} and the @emph{end} of the
box. For a @code{<gtk-vbox>}, the start is defined as the top of the box and the
end is defined as the bottom. For a @code{<gtk-hbox>} the start is defined as
the left side and the end is defined as the right side.

Use repeated calls to @code{gtk-box-pack-start} to pack widgets into a GtkBox
from start to end. Use @code{gtk-box-pack-end} to add widgets from end to start.
You may intersperse these calls and add widgets from both ends of the same
GtkBox.

Use @code{gtk-box-pack-start-defaults} or @code{gtk-box-pack-end-defaults} to
pack widgets into a GtkBox if you do not need to specify the , , or attributes
of the child to be added.

Because GtkBox is a @code{<gtk-container>}, you may also use
@code{gtk-container-add} to insert widgets into the box, and they will be packed
as if with @code{gtk-box-pack-start-defaults}. Use @code{gtk-container-remove}
to remove widgets from the GtkBox.

Use @code{gtk-box-set-homogeneous} to specify whether or not all children of the
GtkBox are forced to get the same amount of space.

Use @code{gtk-box-set-spacing} to determine how much space will be minimally
placed between all children in the GtkBox.

Use @code{gtk-box-reorder-child} to move a GtkBox child to a different place in
the box.

Use @code{gtk-box-set-child-packing} to reset the , , and attributes of any
GtkBox child. Use @code{gtk-box-query-child-packing} to query these fields.

@section Usage
@include defuns-gtkbox.xml.texi

@c %end of fragment
