## Flexible Grid

Flexible Grid — A flexible grid layout manager

## Functions

GtkWidget * | eos_flexy_grid_new ()
void | eos_flexy_grid_set_cell_size ()
guint | eos_flexy_grid_get_cell_size ()
void | eos_flexy_grid_set_cell_spacing ()
guint | eos_flexy_grid_get_cell_spacing ()
void | eos_flexy_grid_insert ()
gint | (*EosFlexyGridSortFunc) ()
void | eos_flexy_grid_set_sort_func ()
EosFlexyGridCell * | eos_flexy_grid_get_cell_at_coords ()
GtkWidget * | eos_flexy_grid_cell_new ()
void | eos_flexy_grid_cell_set_shape ()
EosFlexyShape | eos_flexy_grid_cell_get_shape ()
gboolean | eos_flexy_grid_cell_get_selected ()

## Properties

int | cell-size | Read / Write
int | cell-spacing | Read / Write
EosFlexyShape | shape | Read / Write

## Signals

void | cell-activated | Run Last
void | cell-selected | Run Last

## Types and Values

struct | EosFlexyGrid
struct | EosFlexyGridCell
enum | EosFlexyShape
#define | EOS_STYLE_CLASS_FLEXY_GRID
#define | EOS_STYLE_CLASS_FLEXY_GRID_CELL

## Object Hierarchy

        GEnum
        ╰── EosFlexyShape
        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ├── GtkBin
                    │   ╰── EosFlexyGridCell
                    ╰── EosFlexyGrid

## Implemented Interfaces

EosFlexyGrid implements AtkImplementorIface and GtkBuildable.

EosFlexyGridCell implements AtkImplementorIface and GtkBuildable.

## Description

The EosFlexyGrid widget provides a grid of cells in a layout controlled by the shape of the cells themselves, through the “shape” property of EosFlexyGridCell.

## Functions

### eos_flexy_grid_new ()

    GtkWidget *
    eos_flexy_grid_new (void);

`eos_flexy_grid_new` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Creates a new EosFlexyGrid widget.

#### Returns

the newly created EosFlexyGrid widget.

[transfer full]

### eos_flexy_grid_set_cell_size ()

    void
    eos_flexy_grid_set_cell_size (EosFlexyGrid *grid,
                                  int size);

`eos_flexy_grid_set_cell_size` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Sets the size of the cells of `grid` .

If `size` is less than 0, the default size will be used.

#### Parameters

grid | a EosFlexyGrid |
size | the size of the cell |

### eos_flexy_grid_get_cell_size ()

    guint
    eos_flexy_grid_get_cell_size (EosFlexyGrid *grid);

`eos_flexy_grid_get_cell_size` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Retrieves the size of the cells of `grid` .

#### Parameters

grid | a EosFlexyGrid |

#### Returns

the size of the cells

### eos_flexy_grid_set_cell_spacing ()

    void
    eos_flexy_grid_set_cell_spacing (EosFlexyGrid *grid,
                                     int spacing);

`eos_flexy_grid_set_cell_spacing` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Sets the spacing between each cell of `grid` .

If `spacing` is less than 0, the default value will be used.

#### Parameters

grid | a EosFlexyGrid |
spacing | the spacing between each cell |

### eos_flexy_grid_get_cell_spacing ()

    guint
    eos_flexy_grid_get_cell_spacing (EosFlexyGrid *grid);

`eos_flexy_grid_get_cell_spacing` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Retrieves the cell spacing of `grid` .

#### Parameters

grid | a EosFlexyGrid |

#### Returns

the spacing between each cell

### eos_flexy_grid_insert ()

    void
    eos_flexy_grid_insert (EosFlexyGrid *grid,
                           GtkWidget *child,
                           int index_);

`eos_flexy_grid_insert` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Inserts `child` inside `grid` , at the given `index_` . If `child` is not a EosFlexyGridCell widget, one will be implicitly created, and `child` added to it.

If `grid` has a sort function, the `index_` is ignored.

If `index_` is less than 0, the `child` is appended at the end of the grid.

If `index_` is 0, the child is prepended at the beginning of the grid.

#### Parameters

grid | a EosFlexyGrid |
child | a GtkWidget |
index_ | the position of the `child` |

### EosFlexyGridSortFunc ()

    gint
    (*EosFlexyGridSortFunc) (EosFlexyGridCell *cell_a,
                             EosFlexyGridCell *cell_b,
                             gpointer user_data);

`EosFlexyGridSortFunc` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Type for functions that determine the sort order of two cells inside the grid.

#### Parameters

cell_a | first cell to compare |
cell_b | second cell to compare |
user_data | data passed to `eos_flexy_grid_set_sort_func()` |

#### Returns

-1 if `cell_a` should come before `cell_b` , 1 if `cell_a` should come after `cell_b` , or 0 if `cell_a` and `cell_b` are identical.

### eos_flexy_grid_set_sort_func ()

    void
    eos_flexy_grid_set_sort_func (EosFlexyGrid *grid,
                                  EosFlexyGridSortFunc sort_func,
                                  gpointer data,
                                  GDestroyNotify notify);

`eos_flexy_grid_set_sort_func` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Sets the sorting function for `grid` .

The `sort_func` function compares two children of `grid` , and must return -1 if the first child should precede the second; 1, if the first child should follow the second; or 0, if the children are identical.

The `notify` function will be called when this function is called with a different `sort_func` (or `NULL`); or when the `grid` widget is destroyed.

#### Parameters

grid | a EosFlexyGrid |
sort_func | a sorting function, or `NULL` to unset an existing one. | [scope notified][allow-none]
data | data to pass to `sort_func` and `notify` . | [closure]
notify | function called when `sort_func` is unset, or the `grid` widget is destroyed |

### eos_flexy_grid_get_cell_at_coords ()

    EosFlexyGridCell *
    eos_flexy_grid_get_cell_at_coords (EosFlexyGrid *grid,
                                       double x_pos,
                                       double y_pos);

`eos_flexy_grid_get_cell_at_coords` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Retrieves the EosFlexyGridCell at the given coordinates.

The coordinates to test must be in widget-relative space.

#### Parameters

grid | a EosFlexyGrid |
x_pos | X coordinate to test, in widget-relative space |
y_pos | Y coordinate to test, in widget-relative space |

#### Returns

the cell at the given coordinates, or `NULL`.

[transfer none]

### eos_flexy_grid_cell_new ()

    GtkWidget *
    eos_flexy_grid_cell_new (void);

`eos_flexy_grid_cell_new` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Creates a new EosFlexyGridCell widget.

#### Returns

the newly created EosFlexyGridCell widget.

[transfer full]

### eos_flexy_grid_cell_set_shape ()

    void
    eos_flexy_grid_cell_set_shape (EosFlexyGridCell *cell,
                                   EosFlexyShape shape);

`eos_flexy_grid_cell_set_shape` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Sets the shape of the `cell` . The `shape` determines the amount of space inside a EosFlexyGrid that will be assigned to the `cell` .

#### Parameters

cell | a EosFlexyGridCell |
shape | the shape of the cell |

### eos_flexy_grid_cell_get_shape ()

    EosFlexyShape
    eos_flexy_grid_cell_get_shape (EosFlexyGridCell *cell);

`eos_flexy_grid_cell_get_shape` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Retrieves the shape of `cell` .

#### Parameters

cell | a EosFlexyGridCell |

#### Returns

the shape of the EosFlexyGridCell

### eos_flexy_grid_cell_get_selected ()

    gboolean
    eos_flexy_grid_cell_get_selected (EosFlexyGridCell *cell);

`eos_flexy_grid_cell_get_selected` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Checks whether `cell` is selected.

#### Parameters

cell | a EosFlexyGridCell |

#### Returns

`TRUE` if the EosFlexyGridCell is selected, and `FALSE` otherwise

## Types and Values

### struct EosFlexyGrid

    struct EosFlexyGrid;

`EosFlexyGrid` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

This structure contains no public members.

### struct EosFlexyGridCell

    struct EosFlexyGridCell;

`EosFlexyGridCell` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

This structure contains no public members.

### enum EosFlexyShape

Sizes for flexible-layout cells in `EosFlexyGrid`.

#### Members

EOS_FLEXY_SHAPE_SMALL | 1x1 shape for small cells |
EOS_FLEXY_SHAPE_MEDIUM_HORIZONTAL | 2x1 “landscape” shape for medium cells |
EOS_FLEXY_SHAPE_MEDIUM_VERTICAL | 1x2 “portrait” shape for medium cells |
EOS_FLEXY_SHAPE_LARGE | 2x2 shape for large cells |

### EOS_STYLE_CLASS_FLEXY_GRID

    #define EOS_STYLE_CLASS_FLEXY_GRID      "flexy-grid"

`EOS_STYLE_CLASS_FLEXY_GRID` has been deprecated since version 0.2 and should not be used in newly-written code.

The EosFlexyGrid widget should not be used in newly written code

A CSS class to match a grid with flexible layout, used by EosFlexyGrid.

### EOS_STYLE_CLASS_FLEXY_GRID_CELL

    #define EOS_STYLE_CLASS_FLEXY_GRID_CELL "flexy-grid-cell"

`EOS_STYLE_CLASS_FLEXY_GRID_CELL` has been deprecated since version 0.2 and should not be used in newly-written code.

The EosFlexyGrid widget should not be used in newly written code

A CSS class to match a cell inside a grid with flexible layout, used by EosFlexyGrid.

## Property Details

### The `“cell-size”` property

      “cell-size”                int

The minimum size of each cell inside a EosFlexyGrid, or -1 for the default.

`EosFlexyGrid:cell-size` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Owner: EosFlexyGrid

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“cell-spacing”` property

      “cell-spacing”             int

The spacing between each cell inside a EosFlexyGrid, or -1 for the default.

`EosFlexyGrid:cell-spacing` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

Owner: EosFlexyGrid

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“shape”` property

      “shape”                    EosFlexyShape

The shape of the cell.

Owner: EosFlexyGridCell

Flags: Read / Write

Default value: EOS_FLEXY_SHAPE_SMALL

## Signal Details

### The `“cell-activated”` signal

    void
    user_function (EosFlexyGrid     *grid,
                   EosFlexyGridCell *cell,
                   gpointer          user_data)

The ::cell-activated signal is emitted each time a cell inside `grid` is activated. Activation happens by clicking on a cell.

`EosFlexyGrid::cell-activated` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

#### Parameters

grid | the EosFlexyGrid that emitted the signal |
cell | the EosFlexyGridCell that was activated |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“cell-selected”` signal

    void
    user_function (EosFlexyGrid     *grid,
                   EosFlexyGridCell *cell,
                   gpointer          user_data)

The ::cell-selected signal is emitted each time a cell inside `grid` is selected. Selection happens by hovering on a cell.

`EosFlexyGrid::cell-selected` has been deprecated since version 0.2 and should not be used in newly-written code.

Use a GtkGrid instead

#### Parameters

grid | the EosFlexyGrid that emitted the signal |
cell | the EosFlexyGridCell that was selected |
user_data | user data set when the signal handler was connected. |

Flags: Run Last