![]() |
![]() |
![]() |
GTK+ Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Child Properties |
#include <gtk/gtk.h> GtkWrapBox; GtkWidget * gtk_wrap_box_new (GtkWrapAllocationMode mode
,GtkWrapBoxSpreading spreading
,guint horizontal_spacing
,guint vertical_spacing
); void gtk_wrap_box_reorder_child (GtkWrapBox *layout
,GtkWidget *widget
,guint index
); enum GtkWrapAllocationMode; void gtk_wrap_box_set_allocation_mode (GtkWrapBox *layout
,GtkWrapAllocationMode mode
); GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *layout
); enum GtkWrapBoxSpreading; void gtk_wrap_box_set_spreading (GtkWrapBox *layout
,GtkWrapBoxSpreading spreading
); void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *layout
,guint spacing
); guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *layout
); void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *layout
,guint spacing
); guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *layout
); void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *layout
,guint n_children
); guint gtk_wrap_box_get_minimum_line_children (GtkWrapBox *layout
); void gtk_wrap_box_set_natural_line_children (GtkWrapBox *layout
,guint n_children
); guint gtk_wrap_box_get_natural_line_children (GtkWrapBox *layout
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkWrapBox
GtkWrapBox implements AtkImplementorIface, GtkBuildable, GtkSizeRequest and GtkOrientable.
"allocation-mode" GtkWrapAllocationMode : Read / Write "horizontal-spacing" guint : Read / Write "minimum-line-children" guint : Read / Write "natural-line-children" guint : Read / Write "spreading" GtkWrapBoxSpreading : Read / Write "vertical-spacing" guint : Read / Write
"horizontal-padding" guint : Read / Write "packing" GtkWrapBoxPacking : Read / Write "vertical-padding" guint : Read / Write
GtkWrapBox allocates space for an ordered list of children by wrapping them over in the box's orentation.
GtkWidget * gtk_wrap_box_new (GtkWrapAllocationMode mode
,GtkWrapBoxSpreading spreading
,guint horizontal_spacing
,guint vertical_spacing
);
Creates an GtkWrapBox.
|
|
|
The GtkWrapBoxSpreading policy to use |
|
The horizontal spacing to add between children |
|
The vertical spacing to add between children |
Returns : |
A new GtkWrapBox container |
void gtk_wrap_box_reorder_child (GtkWrapBox *layout
,GtkWidget *widget
,guint index
);
Reorders the child widget
in box
's list of children.
|
|
|
The child to reorder |
|
The new child position |
typedef enum { GTK_WRAP_ALLOCATE_FREE = 0, GTK_WRAP_ALLOCATE_ALIGNED, GTK_WRAP_ALLOCATE_HOMOGENEOUS } GtkWrapAllocationMode;
Describes how an GtkWrapBox positions its children.
void gtk_wrap_box_set_allocation_mode (GtkWrapBox *layout
,GtkWrapAllocationMode mode
);
Sets the allocation mode for box
's children.
|
|
|
The GtkWrapAllocationMode to use. |
GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *layout
);
Gets the allocation mode.
|
|
Returns : |
The GtkWrapAllocationMode for box .
|
typedef enum { GTK_WRAP_BOX_SPREAD_START = 0, GTK_WRAP_BOX_SPREAD_END, GTK_WRAP_BOX_SPREAD_EVEN, GTK_WRAP_BOX_SPREAD_EXPAND } GtkWrapBoxSpreading;
Describes how an GtkWrapBox deals with extra space when allocating children.
The box always tries to fit as many children at their natural size in the given orentation as possible with the exception of fitting "minimum-line-children" items into the available size. When the available size is larger than the size needed to fit a given number of children at their natural size then extra space is available to distribute among children. The GtkWrapBoxSpreading option describes what to do with this space.
Children are allocated no more than their natural size in the layout's orientation and any extra space is left trailing at the end of each line. | |
Children are allocated no more than their natural size in the layout's orientation and any extra space skipped at the beginning of each line. | |
Children are allocated no more than their natural size in the layout's orientation and any extra space is evenly distributed as empty space between children. | |
Items share the extra space evenly (or among children that 'expand' when
in GTK_WRAP_ALLOCATE_FREE mode.
|
void gtk_wrap_box_set_spreading (GtkWrapBox *layout
,GtkWrapBoxSpreading spreading
);
Sets the spreading mode for box
's children.
|
|
|
The GtkWrapBoxSpreading to use. |
void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *layout
,guint spacing
);
Sets the vertical space to add between children.
|
|
|
The spacing to use. |
guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *layout
);
Gets the vertical spacing.
|
|
Returns : |
The vertical spacing. |
void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *layout
,guint spacing
);
Sets the horizontal space to add between children.
|
|
|
The spacing to use. |
guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *layout
);
Gets the horizontal spacing.
|
|
Returns : |
The horizontal spacing. |
void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *layout
,guint n_children
);
Sets the minimum amount of children to line up
in box
's orientation before wrapping.
|
|
|
The minimum amount of children per line. |
guint gtk_wrap_box_get_minimum_line_children
(GtkWrapBox *layout
);
Gets the minimum amount of children per line.
|
|
Returns : |
The minimum amount of children per line. |
void gtk_wrap_box_set_natural_line_children (GtkWrapBox *layout
,guint n_children
);
Sets the natural length of items to request and
allocate space for in box
's orientation.
Setting the natural amount of children per line
limits the overall natural size request to be no more
than n_children
items long in the given orientation.
|
|
|
The natural amount of children per line. |
guint gtk_wrap_box_get_natural_line_children
(GtkWrapBox *layout
);
Gets the natural amount of children per line.
|
|
Returns : |
The natural amount of children per line. |
"allocation-mode"
property"allocation-mode" GtkWrapAllocationMode : Read / Write
The GtkWrapAllocationMode to use.
Default value: GTK_WRAP_ALLOCATE_FREE
"horizontal-spacing"
property"horizontal-spacing" guint : Read / Write
The amount of horizontal space between two children.
Allowed values: <= 65535
Default value: 0
"minimum-line-children"
property"minimum-line-children" guint : Read / Write
The minimum number of children to allocate consecutively in the given orientation.
Setting the minimum children per line ensures that a reasonably small height will be requested for the overall minimum width of the box.
Allowed values: <= 65535
Default value: 0
"natural-line-children"
property"natural-line-children" guint : Read / Write
The maximum amount of children to request space for consecutively in the given orientation.
Allowed values: <= 65535
Default value: 0
"spreading"
property"spreading" GtkWrapBoxSpreading : Read / Write
The GtkWrapBoxSpreading to used to define what is done with extra space.
Default value: GTK_WRAP_BOX_SPREAD_START
"vertical-spacing"
property"vertical-spacing" guint : Read / Write
The amount of vertical space between two children.
Allowed values: <= 65535
Default value: 0
"horizontal-padding"
child property"horizontal-padding" guint : Read / Write
Extra space to put between the child and its left and right neighbors, in pixels.
Allowed values: <= 65535
Default value: 0
"packing"
child property "packing" GtkWrapBoxPacking : Read / Write
The GtkWrapBoxPacking options to specify how to pack a child into the box.
"vertical-padding"
child property"vertical-padding" guint : Read / Write
Extra space to put between the child and its upper and lower neighbors, in pixels.
Allowed values: <= 65535
Default value: 0