
@c %start of fragment

@deftp Class <gtk-container>
Derives from @code{<gtk-widget>}.

This class defines the following properties:

@table @code
@item border-width
The width of the empty border outside the containers children

@item resize-mode
Specify how resize events are handled

@item child
Can be used to add a new child to the container

@end table

@end deftp

@defop Signal <gtk-container> add  (arg0@tie{}@code{<gtk-widget>})
@end defop

@defop Signal <gtk-container> remove  (arg0@tie{}@code{<gtk-widget>})
@end defop

@defop Signal <gtk-container> check-resize 
@end defop

@defop Signal <gtk-container> set-focus-child  (arg0@tie{}@code{<gtk-widget>})
@end defop

@deffn Function gtk-container-add  (self@tie{}@code{<gtk-container>}) (widget@tie{}@code{<gtk-widget>})
@deffnx Method add
Adds @var{widget} to @var{container}. Typically used for simple containers such
as @code{<gtk-window>}, @code{<gtk-frame>}, or @code{<gtk-button>}; for more
complicated layout containers such as @code{<gtk-box>} or @code{<gtk-table>},
this function will pick default packing parameters that may not be correct. So
consider functions such as @code{gtk-box-pack-start} and @code{gtk-table-attach}
as an alternative to @code{gtk-container-add} in those cases. A widget may be
added to only one container at a time; you can't place the same widget inside
two different containers.

@table @var
@item container
a @code{<gtk-container>}

@item widget
a widget to be placed inside @var{container}

@end table

@end deffn

@deffn Function gtk-container-remove  (self@tie{}@code{<gtk-container>}) (widget@tie{}@code{<gtk-widget>})
@deffnx Method remove
Removes @var{widget} from @var{container}. @var{widget} must be inside
@var{container}. Note that @var{container} will own a reference to @var{widget},
and that this may be the last reference held; so removing a widget from its
container can destroy that widget. If you want to use @var{widget} again, you
need to add a reference to it while it's not inside a container, using
@code{g-object-ref}. If you don't want to use @var{widget} again it's usually
more efficient to simply destroy it directly using @code{gtk-widget-destroy}
since this will remove it from the container and help break any circular
reference count cycles.

@table @var
@item container
a @code{<gtk-container>}

@item widget
a current child of @var{container}

@end table

@end deffn

@deffn Function gtk-container-get-resize-mode  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{<gtk-resize-mode>})
@deffnx Method get-resize-mode
Returns the resize mode for the container. See
@code{gtk-container-set-resize-mode}.

@table @var
@item container
a @code{<gtk-container>}

@item ret
the current resize mode

@end table

@end deffn

@deffn Function gtk-container-set-resize-mode  (self@tie{}@code{<gtk-container>}) (resize_mode@tie{}@code{<gtk-resize-mode>})
@deffnx Method set-resize-mode
Sets the resize mode for the container.

The resize mode of a container determines whether a resize request will be
passed to the container's parent, queued for later execution or executed
immediately.

@table @var
@item container
a @code{<gtk-container>}.

@item resize-mode
the new resize mode.

@end table

@end deffn

@deffn Function gtk-container-check-resize  (self@tie{}@code{<gtk-container>})
@deffnx Method check-resize
@table @var
@item container


@end table

@end deffn

@deffn Function gtk-container-get-children  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{glist-of})
@deffnx Method get-children
Returns the container's non-internal children. See @code{gtk-container-forall}
for details on what constitutes an "internal" child.

@table @var
@item container
a @code{<gtk-container>}.

@item ret
a newly-allocated list of the container's non-internal children.

@end table

@end deffn

@deffn Function gtk-container-set-focus-child  (self@tie{}@code{<gtk-container>}) (child@tie{}@code{<gtk-widget>})
@deffnx Method set-focus-child
@table @var
@item container


@item child


@end table

@end deffn

@deffn Function gtk-container-get-focus-vadjustment  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{<gtk-adjustment>})
@deffnx Method get-focus-vadjustment
Retrieves the vertical focus adjustment for the container. See
@code{gtk-container-set-focus-vadjustment}.

@table @var
@item container
a @code{<gtk-container>}

@item ret
the vertical focus adjustment, or @samp{@code{#f}} if none has been set.

@end table

@end deffn

@deffn Function gtk-container-set-focus-vadjustment  (self@tie{}@code{<gtk-container>}) (adjustment@tie{}@code{<gtk-adjustment>})
@deffnx Method set-focus-vadjustment
Hooks up an adjustment to focus handling in a container, so when a child of the
container is focused, the adjustment is scrolled to show that widget. This
function sets the vertical alignment. See
@code{gtk-scrolled-window-get-vadjustment} for a typical way of obtaining the
adjustment and @code{gtk-container-set-focus-hadjustment} for setting the
horizontal adjustment.

The adjustments have to be in pixel units and in the same coordinate system as
the allocation for immediate children of the container.

@table @var
@item container
a @code{<gtk-container>}

@item adjustment
an adjustment which should be adjusted when the focus is moved among the
descendents of @var{container}

@end table

@end deffn

@deffn Function gtk-container-get-focus-hadjustment  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{<gtk-adjustment>})
@deffnx Method get-focus-hadjustment
Retrieves the horizontal focus adjustment for the container. See
@code{gtk-container-set-focus-hadjustment}.

@table @var
@item container
a @code{<gtk-container>}

@item ret
the horizontal focus adjustment, or @samp{@code{#f}} if none has been set.

@end table

@end deffn

@deffn Function gtk-container-set-focus-hadjustment  (self@tie{}@code{<gtk-container>}) (adjustment@tie{}@code{<gtk-adjustment>})
@deffnx Method set-focus-hadjustment
Hooks up an adjustment to focus handling in a container, so when a child of the
container is focused, the adjustment is scrolled to show that widget. This
function sets the horizontal alignment. See
@code{gtk-scrolled-window-get-hadjustment} for a typical way of obtaining the
adjustment and @code{gtk-container-set-focus-vadjustment} for setting the
vertical adjustment.

The adjustments have to be in pixel units and in the same coordinate system as
the allocation for immediate children of the container.

@table @var
@item container
a @code{<gtk-container>}

@item adjustment
an adjustment which should be adjusted when the focus is moved among the
descendents of @var{container}

@end table

@end deffn

@deffn Function gtk-container-resize-children  (self@tie{}@code{<gtk-container>})
@deffnx Method resize-children
@table @var
@item container


@end table

@end deffn

@deffn Function gtk-container-child-type  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{<gtype>})
@deffnx Method child-type
Returns the type of the children supported by the container.

Note that this may return @samp{G_TYPE_NONE} to indicate that no more children
can be added, e.g. for a @code{<gtk-paned>} which already has two children.

@table @var
@item container
a @code{<gtk-container>}.

@item ret
a @code{<g-type>}.

@end table

@end deffn

@deffn Function gtk-container-child-get-property  (self@tie{}@code{<gtk-container>}) (child@tie{}@code{<gtk-widget>}) (property_name@tie{}@code{mchars}) (value@tie{}@code{<gvalue>})
@deffnx Method child-get-property
Gets the value of a child property for @var{child} and @var{container}.

@table @var
@item container
a @code{<gtk-container>}

@item child
a widget which is a child of @var{container}

@item property-name
the name of the property to get

@item value
a location to return the value

@end table

@end deffn

@deffn Function gtk-container-child-set-property  (self@tie{}@code{<gtk-container>}) (child@tie{}@code{<gtk-widget>}) (property_name@tie{}@code{mchars}) (value@tie{}@code{<gvalue>})
@deffnx Method child-set-property
Sets a child property for @var{child} and @var{container}.

@table @var
@item container
a @code{<gtk-container>}

@item child
a widget which is a child of @var{container}

@item property-name
the name of the property to set

@item value
the value to set the property to

@end table

@end deffn

@deffn Function gtk-container-get-border-width  (self@tie{}@code{<gtk-container>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-border-width
Retrieves the border width of the container. See
@code{gtk-container-set-border-width}.

@table @var
@item container
a @code{<gtk-container>}

@item ret
the current border width

@end table

@end deffn

@deffn Function gtk-container-set-border-width  (self@tie{}@code{<gtk-container>}) (border_width@tie{}@code{unsigned-int})
@deffnx Method set-border-width
Sets the border width of the container.

The border width of a container is the amount of space to leave around the
outside of the container. The only exception to this is @code{<gtk-window>};
because toplevel windows can't leave space outside, they leave the space inside.
The border is added on all sides of the container. To add space to only one
side, one approach is to create a @code{<gtk-alignment>} widget, call
@code{gtk-widget-set-usize} to give it a size, and place it on the side of the
container as a spacer.

@table @var
@item container
a @code{<gtk-container>}

@item border-width
amount of blank space to leave @emph{outside} the container. Valid values are in
the range 0-65535 pixels.

@end table

@end deffn

@deffn Function gtk-container-propagate-expose  (self@tie{}@code{<gtk-container>}) (child@tie{}@code{<gtk-widget>}) (event@tie{}@code{<gdk-event-expose>})
@deffnx Method propagate-expose
When a container receives an expose event, it must send synthetic expose events
to all children that don't have their own @code{<gdk-windows>}. This function
provides a convenient way of doing this. A container, when it receives an expose
event, calls @code{gtk-container-propagate-expose} once for each child, passing
in the event the container received.

@code{gtk-container-propagate-expose} takes care of deciding whether an expose
event needs to be sent to the child, intersecting the event's area with the
child area, and sending the event.

In most cases, a container can simply either simply inherit the ::expose
implementation from @code{<gtk-container>}, or, do some drawing and then chain
to the ::expose implementation from @code{<gtk-container>}.

@table @var
@item container
a @code{<gtk-container>}

@item child
a child of @var{container}

@item event
a expose event sent to container

@end table

@end deffn

@deffn Function gtk-container-set-focus-chain  (self@tie{}@code{<gtk-container>}) (focusable_widgets@tie{}@code{glist-of})
@deffnx Method set-focus-chain
Sets a focus chain, overriding the one computed automatically by GTK+.

In principle each widget in the chain should be a descendant of the container,
but this is not enforced by this method, since it's allowed to set the focus
chain before you pack the widgets, or have a widget in the chain that isn't
always packed. The necessary checks are done when the focus chain is actually
traversed.

@table @var
@item container
a @code{<gtk-container>}.

@item focusable-widgets
the new focus chain.

@end table

@end deffn

@deffn Function gtk-container-unset-focus-chain  (self@tie{}@code{<gtk-container>})
@deffnx Method unset-focus-chain
Removes a focus chain explicitly set with @code{gtk-container-set-focus-chain}.

@table @var
@item container
a @code{<gtk-container>}.

@end table

@end deffn


@c %end of fragment
