Top | ![]() |
![]() |
![]() |
![]() |
ClutterActor * | mx_table_new () |
void | mx_table_set_column_spacing () |
gint | mx_table_get_column_spacing () |
void | mx_table_set_row_spacing () |
gint | mx_table_get_row_spacing () |
void | mx_table_add_actor () |
void | mx_table_add_actor_with_properties () |
gint | mx_table_get_row_count () |
gint | mx_table_get_column_count () |
int | column-count | Read |
int | column-spacing | Read / Write |
int | row-count | Read |
int | row-spacing | Read / Write |
MxTable implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable and MxFocusable.
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...
void mx_table_set_column_spacing (MxTable *table
,gint spacing
);
Sets the amount of spacing between columns.
gint
mx_table_get_column_spacing (MxTable *table
);
Gets the amount of spacing between columns.
void mx_table_set_row_spacing (MxTable *table
,gint spacing
);
Sets the amount of spacing between rows.
gint
mx_table_get_row_spacing (MxTable *table
);
Gets the amount of spacing between rows.
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 |
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. |
gint
mx_table_get_row_count (MxTable *table
);
Retrieve the current number rows in the table
struct MxTable;
The contents of this structure is private and should only be accessed using the provided API.
“column-count”
property “column-count” int
The number of columns in the table.
Owner: MxTable
Flags: Read
Allowed values: >= 0
Default value: 0
“column-spacing”
property “column-spacing” int
Spacing between columns.
Owner: MxTable
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“row-count”
property “row-count” int
The number of rows in the table.
Owner: MxTable
Flags: Read
Allowed values: >= 0
Default value: 0