|
|
|
|
adg-1 reference manual |
|
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct AdgTable; struct AdgTableClass;void adg_table_foreach (AdgTable *table,,GCallback callback);gpointer user_datavoid adg_table_foreach_cell (AdgTable *table,,GCallback callback); AdgTableCell * adg_table_get_cell (gpointer user_dataAdgTable *table,const); AdgDress adg_table_get_table_dress (gchar *nameAdgTable *table); AdgStyle * adg_table_get_table_style (AdgTable *table);gboolean adg_table_has_frame (AdgTable *table);void adg_table_insert (AdgTable *table,AdgTableRow *table_row,AdgTableRow *before_row);void adg_table_invalidate_grid (AdgTable *table); AdgTable * adg_table_new (void);void adg_table_remove (AdgTable *table,AdgTableRow *table_row);void adg_table_set_cell (AdgTable *table,const,gchar *nameAdgTableCell *table_cell);void adg_table_set_table_dress (AdgTable *table,AdgDress dress);void adg_table_switch_frame (AdgTable *table,);gboolean new_state
The AdgTable is the entity to be used for rendering data arranged in tabular evironments.
To define a table, you should add to it a serie of one or more AdgTableRow by using the AdgTableRow specific APIs.
struct AdgTable;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
void adg_table_foreach (AdgTable *table,,GCallback callback);gpointer user_data
Invokes callback on each row of table.
The callback should be declared as:
void callback(AdgTableRow *table_row, gpointer user_data);
|
|
an AdgTable |
|
|
a callback. [scope call] |
|
|
callback user data |
Since 1.0
void adg_table_foreach_cell (AdgTable *table,,GCallback callback);gpointer user_data
Invokes callback on each cell of table.
The callback should be declared as:
void callback(AdgTableCell *table_cell, gpointer user_data);
|
|
an AdgTable |
|
|
a callback. [scope call] |
|
|
callback user data |
Since 1.0
AdgTableCell * adg_table_get_cell (AdgTable *table,const);gchar *name
Gets the cell named name inside table. Only named cells
can be retrieved by this method.
The returned cell is owned by @ŧable and must not be modified or freed.
|
|
an AdgTable |
|
|
the name of a cell |
|
Returns : |
the requested cell or NULL |
Since 1.0
AdgDress adg_table_get_table_dress (AdgTable *table);
Gets the table dress to be used in rendering table.
|
|
an AdgTable |
|
Returns : |
the current table dress. [transfer none] |
Since 1.0
AdgStyle * adg_table_get_table_style (AdgTable *table);
Gets the AdgTableStyle explicitely set on table. This is a kind
of accessor function: for rendering purpose use adg_entity_style()
instead. The returned object is owned by table and should not be
freed or modified.
|
|
an AdgTable |
|
Returns : |
the requested style or NULL |
Since 1.0
gboolean adg_table_has_frame (AdgTable *table);
Returns the state of the "has-frame" property.
|
|
an AdgTable |
|
Returns : |
the current state. |
Since 1.0
void adg_table_insert (AdgTable *table,AdgTableRow *table_row,AdgTableRow *before_row);
Inserts table_row inside the rows list of table. If before_row
is specified, table_row is inserted before it.
|
|
an AdgTable |
|
|
a valid AdgTableRow |
|
|
an AdgTableRow or NULL |
Since 1.0
void adg_table_invalidate_grid (AdgTable *table);
This method is only useful in table children implementation.
Clears the internal grid cache, effectively forcing its regeneration next time the "arrange" signal is emitted.
|
|
an AdgTable |
AdgTable * adg_table_new (void);
Creates a new empty table entity. The "local-method" property is set by default to ADG_MIX_DISABLED, that is the table is not subject to any local transformations.
|
Returns : |
the newly created table entity |
Since 1.0
void adg_table_remove (AdgTable *table,AdgTableRow *table_row);
Removes table_row from list of rows of table.
|
|
an AdgTable |
|
|
a valid AdgTableRow |
Since 1.0
void adg_table_set_cell (AdgTable *table,const,gchar *nameAdgTableCell *table_cell);
Binds table_cell to name, so it can be accessed by name later
with adg_table_get_cell(). Internally the binding is handled with
an hash table, so accessing the cell this way is O(1).
If name is NULL
If table_cell is NULLname in the hash table will
be removed.
Both name and table_cell cannot be NULL
|
|
an AdgTable |
|
|
the name of the cell |
|
|
the named cell |
Since 1.0
void adg_table_set_table_dress (AdgTable *table,AdgDress dress);
Sets a new table dress for rendering table. The new dress
must be related to the original dress for this property:
you cannot set a dress used for line styles to a dress
managing fonts.
The check is done by calling adg_dress_are_related() with
dress and the previous dress as arguments. Check out its
documentation for details on what is a related dress.
Since 1.0
void adg_table_switch_frame (AdgTable *table,);gboolean new_state
Sets the "has-frame" property: TRUE
|
|
an AdgTable |
|
|
the new state of the frame |
Since 1.0
"has-frame" property"has-frame"gboolean : Read / Write
If enabled, a frame using the proper dress found in this table style will be drawn around the table extents.
Default value: TRUE
"table-dress" property"table-dress" AdgDress : Read / Write
The dress to use for stroking this entity.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0