MxTable

## MxTable MxTable — A multi-child layout container based on rows and columns |

## Synopsis

    struct              MxTable;
    struct              MxTableClass;
    ClutterActor *      mx_table_new                        (void);
    void                mx_table_set_column_spacing         (MxTable *table,
                                                             gint spacing);
    gint                mx_table_get_column_spacing         (MxTable *table);
    void                mx_table_set_row_spacing            (MxTable *table,
                                                             gint spacing);
    gint                mx_table_get_row_spacing            (MxTable *table);
    void                mx_table_add_actor                  (MxTable *table,
                                                             ClutterActor *actor,
                                                             gint row,
                                                             gint column);
    void                mx_table_add_actor_with_properties  (MxTable *table,
                                                             ClutterActor *actor,
                                                             gint row,
                                                             gint column,
                                                             const gchar *first_property_name,
                                                             ...);
    gint                mx_table_get_row_count              (MxTable *table);
    gint                mx_table_get_column_count           (MxTable *table);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----MxWidget
                         +----MxTable

## Implemented Interfaces

MxTable implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable and MxFocusable.

## Properties

      "column-count"             gint                  : Read
      "column-spacing"           gint                  : Read / Write
      "row-count"                gint                  : Read
      "row-spacing"              gint                  : Read / Write

## Description

MxTable is a mult-child layout container based on a table arrangement with rows and columns. MxTable adds several child properties to its children which control their position and size in the table.

While other layouts (like MxGrid) allow you to achieve table-like effects, MxTable is the only layout which allows you to precisely (and easily) place elements at particular grid coordinates, via `mx_table_add_actor()`.

Figure 10. MxTable, 3 rows by 3 columns

Notice how rectangles have only been placed in a few of the cells inside the table: this would be very difficult to do with any other layout, without having layouts within layouts within layouts...

## Details

### struct MxTable

    struct MxTable;

The contents of this structure is private and should only be accessed using the provided API.

### struct MxTableClass

    struct MxTableClass {
      MxWidgetClass parent_class;

      /* padding for future expansion */
      void (*_padding_0) (void);
      void (*_padding_1) (void);
      void (*_padding_2) (void);
      void (*_padding_3) (void);
      void (*_padding_4) (void);
    };

### mx_table_new ()

    ClutterActor *      mx_table_new                        (void);

Create a new MxTable

Returns : | a new MxTable

### mx_table_set_column_spacing ()

    void                mx_table_set_column_spacing         (MxTable *table,
                                                             gint spacing);

Sets the amount of spacing between columns.

`table` : | a MxTable
`spacing` : | spacing in pixels

### mx_table_get_column_spacing ()

    gint                mx_table_get_column_spacing         (MxTable *table);

Gets the amount of spacing between columns.

`table` : | a MxTable
Returns : | the spacing between columns in device units

### mx_table_set_row_spacing ()

    void                mx_table_set_row_spacing            (MxTable *table,
                                                             gint spacing);

Sets the amount of spacing between rows.

`table` : | a MxTable
`spacing` : | spacing in pixels

### mx_table_get_row_spacing ()

    gint                mx_table_get_row_spacing            (MxTable *table);

Gets the amount of spacing between rows.

`table` : | a MxTable
Returns : | the spacing between rows in device units

### mx_table_add_actor ()

    void                mx_table_add_actor                  (MxTable *table,
                                                             ClutterActor *actor,
                                                             gint row,
                                                             gint column);

Add an actor at the specified row and column

Note, column and rows numbers start from zero

`table` : | a MxTable
`actor` : | the child to insert
`row` : | the row to place the child into
`column` : | the column to place the child into

### mx_table_add_actor_with_properties ()

    void                mx_table_add_actor_with_properties  (MxTable *table,
                                                             ClutterActor *actor,
                                                             gint row,
                                                             gint column,
                                                             const gchar *first_property_name,
                                                             ...);

Add an actor into at the specified row and column, with additional child properties to set.

`table` : | a MxTable
`actor` : | the child ClutterActor
`row` : | the row to place the child into
`column` : | the column to place the child into
`first_property_name` : | name of the first property to set
`...` : | value for the first property, followed optionally by more name/value pairs terminated with NULL.

### mx_table_get_row_count ()

    gint                mx_table_get_row_count              (MxTable *table);

Retrieve the current number rows in the `table`

`table` : | A MxTable
Returns : | the number of rows

### mx_table_get_column_count ()

    gint                mx_table_get_column_count           (MxTable *table);

Retrieve the current number of columns in `table`

`table` : | A MxTable
Returns : | the number of columns

## Property Details

### The `"column-count"` property

      "column-count"             gint                  : Read

The number of columns in the table.

Allowed values: >= 0

Default value: 0

### The `"column-spacing"` property

      "column-spacing"           gint                  : Read / Write

Spacing between columns.

Allowed values: >= 0

Default value: 0

### The `"row-count"` property

      "row-count"                gint                  : Read

The number of rows in the table.

Allowed values: >= 0

Default value: 0

### The `"row-spacing"` property

      "row-spacing"              gint                  : Read / Write

Spacing between row.

Allowed values: >= 0

Default value: 0