GTK+ Container Superclass

Description

  • Container widgets are the inner nodes in the resulting tree of widgets: they contain other widgets.
  • There are two major kinds of container widgets in GTK+.
    • The first type of container widget has a single child widget and derives from GtkBin. These containers are decorators, which add some kind of functionality to the child.
    • The second type of container can have more than one child; its purpose is to manage layout. This means that these containers assign (= zuweisen, bestimmen) sizes and positions to their children.

GtkContainer: Description

Child properties

  • GtkContainer introduces child properties. These are object properties that are not specific to either the container or the contained widget, but rather to their relation.

GtkContainer: Child properties

Border

  • 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 gtk_widget_set_size_request() to give it a size, and place it on the side of the container as a spacer.

gtk_container_set_border_width()

Leave a Reply

Your email address will not be published. Required fields are marked *