### Class

# Clutter FlowLayout

#### Description [src]

    class Clutter.FlowLayout : Clutter.LayoutManager {
      /* No available fields */
    }

A reflowing layout manager

`ClutterFlowLayout` is a layout manager which implements the following policy:

- the preferred natural size depends on the value of the `ClutterFlowLayout:orientation` property; the layout will try to maintain all its children on a single row or column;
- if either the width or the height allocated are smaller than the preferred ones, the layout will wrap; in this case, the preferred height or width, respectively, will take into account the amount of columns and rows;
- each line (either column or row) in reflowing will have the size of the biggest cell on that line; if the `ClutterFlowLayout:homogeneous` property is set to `FALSE` the actor will be allocated within that area, and if set to `TRUE` instead the actor will be given exactly that area;
- the size of the columns or rows can be controlled for both minimum and maximum; the spacing can also be controlled in both columns and rows.

The flow-layout example shows how to use the `ClutterFlowLayout`.

#### Ancestors

- ClutterLayoutManager
- GInitiallyUnowned
- GObject

#### Constructors

###### clutter_flow_layout_new

Creates a new `ClutterFlowLayout` with the given `orientation`.

#### Instance methods

###### clutter_flow_layout_get_column_spacing

Retrieves the spacing between columns.

###### clutter_flow_layout_get_column_width

Retrieves the minimum and maximum column widths.

###### clutter_flow_layout_get_homogeneous

Retrieves whether the `layout` is homogeneous.

###### clutter_flow_layout_get_orientation

Retrieves the orientation of the `layout`.

###### clutter_flow_layout_get_row_height

Retrieves the minimum and maximum row heights.

###### clutter_flow_layout_get_row_spacing

Retrieves the spacing between rows.

###### clutter_flow_layout_get_snap_to_grid

Retrieves the value of `ClutterFlowLayout:snap-to-grid` property.

###### clutter_flow_layout_set_column_spacing

Sets the space between columns, in pixels.

###### clutter_flow_layout_set_column_width

Sets the minimum and maximum widths that a column can have.

###### clutter_flow_layout_set_homogeneous

Sets whether the `layout` should allocate the same space for each child.

###### clutter_flow_layout_set_orientation

Sets the orientation of the flow layout.

###### clutter_flow_layout_set_row_height

Sets the minimum and maximum heights that a row can have.

###### clutter_flow_layout_set_row_spacing

Sets the spacing between rows, in pixels.

###### clutter_flow_layout_set_snap_to_grid

Whether the `layout` should place its children on a grid.

##### Methods inherited from ClutterLayoutManager (12)

###### clutter_layout_manager_allocate

Allocates the children of `container` given an area.

###### clutter_layout_manager_child_get

Retrieves the values for a list of properties out of the `ClutterLayoutMeta` created by `manager` and attached to the child of a `container`.

###### clutter_layout_manager_child_get_property

Gets a property on the `ClutterLayoutMeta` created by `manager` and attached to a child of `container`.

###### clutter_layout_manager_child_set

Sets a list of properties and their values on the `ClutterLayoutMeta` associated by `manager` to a child of `container`.

###### clutter_layout_manager_child_set_property

Sets a property on the `ClutterLayoutMeta` created by `manager` and attached to a child of `container`.

###### clutter_layout_manager_find_child_property

Retrieves the `GParamSpec` for the layout property `name` inside the `ClutterLayoutMeta` sub-class used by `manager`.

###### clutter_layout_manager_get_child_meta

Retrieves the `ClutterLayoutMeta` that the layout `manager` associated to the `actor` child of `container`, eventually by creating one if the `ClutterLayoutManager` supports layout properties.

###### clutter_layout_manager_get_preferred_height

Computes the minimum and natural heights of the `container` according to `manager`.

###### clutter_layout_manager_get_preferred_width

Computes the minimum and natural widths of the `container` according to `manager`.

###### clutter_layout_manager_layout_changed

Emits the `ClutterLayoutManager::layout-changed` signal on `manager`.

###### clutter_layout_manager_list_child_properties

Retrieves all the `GParamSpec`s for the layout properties stored inside the `ClutterLayoutMeta` sub-class used by `manager`.

###### clutter_layout_manager_set_container

If the `ClutterLayoutManager` sub-class allows it, allow adding a weak reference of the `container` using `manager` from within the layout manager.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Clutter.FlowLayout:column-spacing

The spacing between columns, in pixels; the value of this property is honoured by horizontal non-overflowing layouts and by vertical overflowing layouts.

###### Clutter.FlowLayout:homogeneous

Whether each child inside the `ClutterFlowLayout` should receive the same allocation.

###### Clutter.FlowLayout:max-column-width

Maximum width for each column in the layout, in pixels. If set to -1 the width will be the maximum child width.

###### Clutter.FlowLayout:max-row-height

Maximum height for each row in the layout, in pixels. If set to -1 the width will be the maximum child height.

###### Clutter.FlowLayout:min-column-width

Minimum width for each column in the layout, in pixels.

###### Clutter.FlowLayout:min-row-height

Minimum height for each row in the layout, in pixels.

###### Clutter.FlowLayout:orientation

The orientation of the `ClutterFlowLayout`. The children of the layout will be laid out following the orientation.

###### Clutter.FlowLayout:row-spacing

The spacing between rows, in pixels; the value of this property is honoured by vertical non-overflowing layouts and by horizontal overflowing layouts.

###### Clutter.FlowLayout:snap-to-grid

Whether the `ClutterFlowLayout` should arrange its children on a grid.

#### Signals

##### Signals inherited from ClutterLayoutManager (1)

###### ClutterLayoutManager::layout-changed

The signal is emitted each time a layout manager has been changed. Every `ClutterActor` using the `manager` instance as a layout manager should connect a handler to the `ClutterLayoutManager::layout-changed` signal and queue a relayout on themselves:

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct ClutterFlowLayoutClass {
      /* no available fields */
    }

The `ClutterFlowLayoutClass` structure contains only private data and should be accessed using the provided API.