NbtkTable

NbtkTable — A multi-child layout container based on rows and columns

Synopsis

                    NbtkTable;
enum                NbtkTableChildOptions;
NbtkWidget*         nbtk_table_new                      (void);
void                nbtk_table_set_col_spacing          (NbtkTable *table,
                                                         gint spacing);
void                nbtk_table_set_row_spacing          (NbtkTable *table,
                                                         gint spacing);
gint                nbtk_table_get_col_spacing          (NbtkTable *table);
gint                nbtk_table_get_row_spacing          (NbtkTable *table);
void                nbtk_table_add_actor                (NbtkTable *table,
                                                         ClutterActor *actor,
                                                         gint row,
                                                         gint column);
void                nbtk_table_add_actor_with_properties
                                                        (NbtkTable *table,
                                                         ClutterActor *actor,
                                                         gint row,
                                                         gint column,
                                                         const gchar *first_property_name,
                                                         ...);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkWidget
                     +----NbtkTable

Implemented Interfaces

NbtkTable implements NbtkStylable, ClutterContainer and ClutterScriptable.

Properties

  "col-spacing"              gint                  : Read / Write
  "homogeneous"              gboolean              : Read / Write
  "padding"                  NbtkPadding*          : Read / Write
  "row-spacing"              gint                  : Read / Write

Description

NbtkTable is a mult-child layout container based on a table arrangement with rows and columns. NbtkTable adds several child properties to it's children that control their position and size in the table.

Details

NbtkTable

typedef struct _NbtkTable NbtkTable;

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


enum NbtkTableChildOptions

typedef enum
{
  NBTK_KEEP_ASPECT_RATIO = 1 << 0,
  NBTK_X_EXPAND          = 1 << 1,
  NBTK_Y_EXPAND          = 1 << 2,
  NBTK_X_FILL            = 1 << 3,
  NBTK_Y_FILL            = 1 << 4
} NbtkTableChildOptions;

Denotes the child properties an NbtkTable child will have.

NBTK_KEEP_ASPECT_RATIO

whether to respect the widget's aspect ratio

NBTK_X_EXPAND

whether to allocate extra space on the widget's x-axis

NBTK_Y_EXPAND

whether to allocate extra space on the widget's y-axis

NBTK_X_FILL

whether to stretch the child to fill the cell horizontally

NBTK_Y_FILL

whether to stretch the child to fill the cell vertically

nbtk_table_new ()

NbtkWidget*         nbtk_table_new                      (void);

Create a new NbtkTable

Returns :

a new NbtkTable

nbtk_table_set_col_spacing ()

void                nbtk_table_set_col_spacing          (NbtkTable *table,
                                                         gint spacing);

Sets the amount of spacing between columns.

table :

a NbtkTable

spacing :

spacing in pixels

nbtk_table_set_row_spacing ()

void                nbtk_table_set_row_spacing          (NbtkTable *table,
                                                         gint spacing);

Sets the amount of spacing between rows.

table :

a NbtkTable

spacing :

spacing in pixels

nbtk_table_get_col_spacing ()

gint                nbtk_table_get_col_spacing          (NbtkTable *table);

Gets the amount of spacing between columns.

table :

a NbtkTable

Returns :

the spacing between columns in device units

nbtk_table_get_row_spacing ()

gint                nbtk_table_get_row_spacing          (NbtkTable *table);

Gets the amount of spacing between rows.

table :

a NbtkTable

Returns :

the spacing between rows in device units

nbtk_table_add_actor ()

void                nbtk_table_add_actor                (NbtkTable *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 NbtkTable

actor :

the child to insert

row :

the row to place the child into

column :

the column to place the child into

nbtk_table_add_actor_with_properties ()

void                nbtk_table_add_actor_with_properties
                                                        (NbtkTable *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 NbtkTable

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.

Property Details

The "col-spacing" property

  "col-spacing"              gint                  : Read / Write

Spacing between columns.

Allowed values: >= 0

Default value: 0


The "homogeneous" property

  "homogeneous"              gboolean              : Read / Write

Homogeneous rows and columns.

Default value: TRUE


The "padding" property

  "padding"                  NbtkPadding*          : Read / Write

Padding of the table.


The "row-spacing" property

  "row-spacing"              gint                  : Read / Write

Spacing between row.

Allowed values: >= 0

Default value: 0