Abstract container class.
Class GtkContainer
This is the abstract container from which all gtk+ widgets which hold other items derive from. It mainly houses virtual functions used for inserting and removing children. Containers in gtk+ may hold one item or many items depending on the implementation.
Methods | |
add | Add a widget to the container. |
check_resize | ??? |
child_type | Returns the type of the children supported by the container. |
get_border_width | Retrieves the border width of the container. |
get_focus_child | Returns the current focus child widget inside container. |
get_resize_mode | Returns the resize mode for the container. |
remove | Removes widget from container. Widget must be inside container. |
resize_children | ??? |
set_border_width | Sets the border width of the container. |
set_focus_child | Sets, or unsets if child is NULL, the focused child of container. |
set_reallocate_redraws | Sets the reallocate_redraws flag of the container to the given value. |
set_resize_mode | Sets the resize mode for the container. |
Add a widget to the container.
GtkContainer.add( widget )
widget | The widget |
???
GtkContainer.check_resize()
Returns the type of the children supported by the container.
GtkContainer.child_type()
Return | type identifier (integer) |
Note that this may return G_TYPE_NONE to indicate that no more children can be added, e.g. for a GtkPaned which already has two children.
Retrieves the border width of the container.
GtkContainer.get_border_width()
Return | (integer) |
Returns the current focus child widget inside container.
GtkContainer.get_focus_child()
Returns the resize mode for the container.
GtkContainer.get_resize_mode()
Removes widget from container. Widget must be inside container.
GtkContainer.remove( widget )
widget |
???
GtkContainer.resize_children()
Sets the border width of the container.
GtkContainer.set_border_width()
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 GtkWindow; 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 GtkAlignment widget, call set_size_request() to give it a size, and place it on the side of the container as a spacer.
Sets, or unsets if child is NULL, the focused child of container.
GtkContainer.set_focus_child( widget )
widget |
Sets the reallocate_redraws flag of the container to the given value.
GtkContainer.set_reallocate_redraws( need_redraws )
need_redraws | (boolean) |
Containers requesting reallocation redraws get automatically redrawn if any of their children changed allocation.
Sets the resize mode for the container.
GtkContainer.set_resize_mode()
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.