Synopsis

#include <adg-1/adg.h>

AdgTableRow *       adg_table_row_dup                   (const AdgTableRow *table_row);
AdgTableRow *       adg_table_row_new                   (AdgTable *table);
AdgTableRow *       adg_table_row_new_before            (AdgTableRow *before_row);
void                adg_table_row_free                  (AdgTableRow *table_row);
void                adg_table_row_insert                (AdgTableRow *table_row,
                                                         AdgTableCell *table_cell,
                                                         AdgTableCell *before_cell);
void                adg_table_row_remove                (AdgTableRow *table_row,
                                                         AdgTableCell *table_cell);
void                adg_table_row_foreach               (AdgTableRow *table_row,
                                                         GCallback callback,
                                                         gpointer user_data);
AdgTable *          adg_table_row_get_table             (AdgTableRow *table_row);
void                adg_table_row_set_height            (AdgTableRow *table_row,
                                                         gdouble height);
gdouble             adg_table_row_get_height            (AdgTableRow *table_row);
const CpmlExtents * adg_table_row_get_extents           (AdgTableRow *table_row);
const CpmlPair *    adg_table_row_size_request          (AdgTableRow *table_row);
const CpmlExtents * adg_table_row_arrange               (AdgTableRow *table_row,
                                                         const CpmlExtents *layout);

Description

The AdgTableRow is a boxed type containing a single row of cells of an AdgTable object.

Every row is segmented into different cells. It must be populated by using the AdgCell APIs, such as adg_table_cell_new() or adg_table_cell_new_before().

Details

adg_table_row_dup ()

AdgTableRow *       adg_table_row_dup                   (const AdgTableRow *table_row);

Duplicates table_row. The returned duplicate should be freed with adg_table_row_free() when no longer needed.

table_row :

an AdgTableRow structure

Returns :

a duplicate of table_row. [transfer full]

Since 1.0


adg_table_row_new ()

AdgTableRow *       adg_table_row_new                   (AdgTable *table);

Creates a new empty row and appends it at the end of the rows yet present in table. By default, the height of this new row will be the fallback value provided by the table style: you can override it by using adg_table_row_set_height().

table :

an AdgTable

Returns :

the newly created row or NULL on errors. [transfer full]

Since 1.0


adg_table_row_new_before ()

AdgTableRow *       adg_table_row_new_before            (AdgTableRow *before_row);

Creates a new empty row with default height and inserts it just before before_row.

before_row :

a valid AdgTableRow

Returns :

the newly created row or NULL on errors. [transfer full]

Since 1.0


adg_table_row_free ()

void                adg_table_row_free                  (AdgTableRow *table_row);

Releases all the memory allocated by table_row, itself included.

table_row :

an AdgTableRow structure

Since 1.0


adg_table_row_insert ()

void                adg_table_row_insert                (AdgTableRow *table_row,
                                                         AdgTableCell *table_cell,
                                                         AdgTableCell *before_cell);

Inserts table_cell inside table_row. If before_cell is specified, table_cell is inserted before it.

table_row :

a valid AdgTableRow

table_cell :

the AdgTableCell to insert

before_cell :

an AdgTableRow or NULL. [allow-none]

Since 1.0


adg_table_row_remove ()

void                adg_table_row_remove                (AdgTableRow *table_row,
                                                         AdgTableCell *table_cell);

Removes table_cell from list of cells of table_row.

table_row :

a valid AdgTableRow

table_cell :

the AdgTableCell to remove

Since 1.0


adg_table_row_foreach ()

void                adg_table_row_foreach               (AdgTableRow *table_row,
                                                         GCallback callback,
                                                         gpointer user_data);

Invokes callback on each cell of table_row. The callback should be declared as:

1
void callback(AdgTableCell *table_cell, gpointer user_data);

table_row :

an AdgTableRow

callback :

a callback. [scope call]

user_data :

callback user data

Since 1.0


adg_table_row_get_table ()

AdgTable *          adg_table_row_get_table             (AdgTableRow *table_row);

Returns the container table of table_row. The returned table is owned by table_row and must not be modified or freed.

table_row :

a valid AdgTableRow

Returns :

the requested table or NULL on errors. [transfer none]

Since 1.0


adg_table_row_set_height ()

void                adg_table_row_set_height            (AdgTableRow *table_row,
                                                         gdouble height);

Sets a new height on table_row. The extents will be invalidated to recompute the whole layout of the table. Specifying 0 in height will use the default height set in the table style.

table_row :

a valid AdgTableRow

height :

the new height

Since 1.0


adg_table_row_get_height ()

gdouble             adg_table_row_get_height            (AdgTableRow *table_row);

Gets the height of table_row.

table_row :

a valid AdgTableRow

Returns :

the requested height or 0 on errors

Since 1.0


adg_table_row_get_extents ()

const CpmlExtents * adg_table_row_get_extents           (AdgTableRow *table_row);

Gets the extents of table_row. This function is useful only after the arrange() phase as in the other situation the extents will likely be not up to date.

table_row :

a valid AdgTableRow

Returns :

the extents of table_row or NULL on errors. [transfer none]

Since 1.0


adg_table_row_size_request ()

const CpmlPair *    adg_table_row_size_request          (AdgTableRow *table_row);

Computes the minimum space needed to properly render table_row and updates the size component of the internal CpmlExtents struct, returning it to the caller. The returned CpmlPair is owned by table_row and should not be modified or freed.

table_row :

a valid AdgTableRow

Returns :

the minimum size required. [transfer none]

Since 1.0


adg_table_row_arrange ()

const CpmlExtents * adg_table_row_arrange               (AdgTableRow *table_row,
                                                         const CpmlExtents *layout);

Rearranges the underlying AdgTableCell owned by table_row using the new extents provided in layout. If the x or y size component of layout is negative, the value holded by the internal extents struct is not overriden.

Note

table_row->extents must be up to date if layout->size.x or layout->size.y is negative in order to have a valid size.

table_row :

an AdgTableRow

layout :

the new extents to use

Returns :

the extents of table_row or NULL on errors. [transfer none]

Since 1.0