![]() |
![]() |
![]() |
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 horizontal_spreading
,GtkWrapBoxSpreading vertical_spreading
,guint horizontal_spacing
,guint vertical_spacing
); enum GtkWrapBoxPacking; void gtk_wrap_box_insert_child (GtkWrapBox *box
,GtkWidget *widget
,gint index
,GtkWrapBoxPacking packing
); void gtk_wrap_box_reorder_child (GtkWrapBox *box
,GtkWidget *widget
,guint index
); enum GtkWrapAllocationMode; void gtk_wrap_box_set_allocation_mode (GtkWrapBox *box
,GtkWrapAllocationMode mode
); GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *box
); enum GtkWrapBoxSpreading; void gtk_wrap_box_set_vertical_spreading (GtkWrapBox *box
,GtkWrapBoxSpreading spreading
); GtkWrapBoxSpreading gtk_wrap_box_get_vertical_spreading (GtkWrapBox *box
); void gtk_wrap_box_set_horizontal_spreading (GtkWrapBox *box
,GtkWrapBoxSpreading spreading
); GtkWrapBoxSpreading gtk_wrap_box_get_horizontal_spreading (GtkWrapBox *box
); void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *box
,guint spacing
); guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *box
); void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *box
,guint spacing
); guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *box
); void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *box
,guint n_children
); guint gtk_wrap_box_get_minimum_line_children (GtkWrapBox *box
); void gtk_wrap_box_set_natural_line_children (GtkWrapBox *box
,guint n_children
); guint gtk_wrap_box_get_natural_line_children (GtkWrapBox *box
);
"allocation-mode" GtkWrapAllocationMode : Read / Write "horizontal-spacing" guint : Read / Write "horizontal-spreading" GtkWrapBoxSpreading : Read / Write "minimum-line-children" guint : Read / Write "natural-line-children" guint : Read / Write "vertical-spacing" guint : Read / Write "vertical-spreading" GtkWrapBoxSpreading : 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 horizontal_spreading
,GtkWrapBoxSpreading vertical_spreading
,guint horizontal_spacing
,guint vertical_spacing
);
Creates an GtkWrapBox.
|
The GtkWrapAllocationMode to use |
|
The horizontal GtkWrapBoxSpreading policy to use |
|
The vertical GtkWrapBoxSpreading policy to use |
|
The horizontal spacing to add between children |
|
The vertical spacing to add between children |
Returns : |
A new GtkWrapBox container |
typedef enum { GTK_WRAP_BOX_H_EXPAND = 1 << 0, GTK_WRAP_BOX_V_EXPAND = 1 << 1 } GtkWrapBoxPacking;
Specifies how widgets will expand vertically and horizontally when placed inside a GtkWrapBox.
void gtk_wrap_box_insert_child (GtkWrapBox *box
,GtkWidget *widget
,gint index
,GtkWrapBoxPacking packing
);
Adds a child to an GtkWrapBox with its packing options set
|
And GtkWrapBox |
|
the child GtkWidget to add |
|
the position in the child list to insert, specify -1 to append to the list. |
|
The GtkWrapBoxPacking options to use. |
void gtk_wrap_box_reorder_child (GtkWrapBox *box
,GtkWidget *widget
,guint index
);
Reorders the child widget
in box
's list of children.
|
An GtkWrapBox |
|
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 *box
,GtkWrapAllocationMode mode
);
Sets the allocation mode for box
's children.
|
An GtkWrapBox |
|
The GtkWrapAllocationMode to use. |
GtkWrapAllocationMode gtk_wrap_box_get_allocation_mode (GtkWrapBox *box
);
Gets the allocation mode.
|
An GtkWrapBox |
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 a GtkWrapBox deals with extra space in a given orientation when allocating children.
Children are allocated no more than their natural size in the given orientation and any extra space is left trailing at the end of each row/column. | |
Children are allocated no more than their natural size in the given orientation and any extra space skipped at the beginning of each row/column. | |
Children are allocated no more than their natural size in the given orientation and any extra space is evenly distributed as empty space between children. | |
Extra space is given to children which asked to expand in the given orientation (or columns/rows which contain children who asked to expand). If no children asked to expand; extra space is distributed evenly. |
void gtk_wrap_box_set_vertical_spreading (GtkWrapBox *box
,GtkWrapBoxSpreading spreading
);
Sets the vertical spreading mode for box
's children.
|
An GtkWrapBox |
|
The GtkWrapBoxSpreading to use. |
GtkWrapBoxSpreading gtk_wrap_box_get_vertical_spreading
(GtkWrapBox *box
);
Gets the vertical spreading mode.
|
An GtkWrapBox |
Returns : |
The vertical GtkWrapBoxSpreading for box .
|
void gtk_wrap_box_set_horizontal_spreading (GtkWrapBox *box
,GtkWrapBoxSpreading spreading
);
Sets the horizontal spreading mode for box
's children.
|
An GtkWrapBox |
|
The GtkWrapBoxSpreading to use. |
GtkWrapBoxSpreading gtk_wrap_box_get_horizontal_spreading
(GtkWrapBox *box
);
Gets the horizontal spreading mode.
|
An GtkWrapBox |
Returns : |
The horizontal GtkWrapBoxSpreading for box .
|
void gtk_wrap_box_set_vertical_spacing (GtkWrapBox *box
,guint spacing
);
Sets the vertical space to add between children.
|
An GtkWrapBox |
|
The spacing to use. |
guint gtk_wrap_box_get_vertical_spacing (GtkWrapBox *box
);
Gets the vertical spacing.
|
An GtkWrapBox |
Returns : |
The vertical spacing. |
void gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *box
,guint spacing
);
Sets the horizontal space to add between children.
|
An GtkWrapBox |
|
The spacing to use. |
guint gtk_wrap_box_get_horizontal_spacing (GtkWrapBox *box
);
Gets the horizontal spacing.
|
An GtkWrapBox |
Returns : |
The horizontal spacing. |
void gtk_wrap_box_set_minimum_line_children (GtkWrapBox *box
,guint n_children
);
Sets the minimum amount of children to line up
in box
's orientation before wrapping.
|
An GtkWrapBox |
|
The minimum amount of children per line. |
guint gtk_wrap_box_get_minimum_line_children
(GtkWrapBox *box
);
Gets the minimum amount of children per line.
|
An GtkWrapBox |
Returns : |
The minimum amount of children per line. |
void gtk_wrap_box_set_natural_line_children (GtkWrapBox *box
,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.
|
An GtkWrapBox |
|
The natural amount of children per line. |
guint gtk_wrap_box_get_natural_line_children
(GtkWrapBox *box
);
Gets the natural amount of children per line.
|
An GtkWrapBox |
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
"horizontal-spreading"
property"horizontal-spreading" GtkWrapBoxSpreading : Read / Write
The GtkWrapBoxSpreading to used to define what is done with extra space in a given orientation.
Default value: GTK_WRAP_BOX_SPREAD_START
"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
"vertical-spacing"
property"vertical-spacing" guint : Read / Write
The amount of vertical space between two children.
Allowed values: <= 65535
Default value: 0
"vertical-spreading"
property"vertical-spreading" GtkWrapBoxSpreading : Read / Write
The GtkWrapBoxSpreading to used to define what is done with extra space in a given orientation.
Default value: GTK_WRAP_BOX_SPREAD_START
"packing"
child property"packing" GtkWrapBoxPacking : Read / Write
The GtkWrapBoxPacking options to specify how to pack a child into the box.