Here is GtkContainer:
typedef struct _GtkContainer GtkContainer;
struct _GtkContainer
{
GtkWidget widget;
GtkWidget *focus_child;
guint border_width : 16;
guint need_resize : 1;
guint resize_mode : 2;
GSList *resize_widgets;
};
|
The focus_child member
is the child in the container with the keyboard focus;
it can be NULL if no
child has the focus. The
GtkContainer implementation handles setting and
unsetting this field. The
border_width member is a width in pixels to add
to the container's size request on all sides; the
container will also subtract this value from its
allocation. (In other words, the border_width is a blank space
around the container.) Library users set the border_width field with gtk_container_set_border_width();
GtkContainer subclasses must
honor its value in their
size_request and
size_allocate implementations.
The need_resize, resize_mode, and resize_widgets fields are
implementation details that subclasses should not have
to read or modify. These fields are used to implement
gtk_widget_queue_resize();
when a resize is queued for a widget, the GtkContainer implementation ensures
that the size negotiation process
(requisition/allocation) will take place a in a
one-shot idle handler. Subclasses of GtkContainer simply implement size_request and size_allocate, and everything
works.