![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
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
);
MxTable implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable and MxFocusable.
"column-count" gint : Read "column-spacing" gint : Read / Write "row-count" gint : Read "row-spacing" gint : Read / Write
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...
struct MxTable;
The contents of this structure is private and should only be accessed using the provided API.
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); };
void mx_table_set_column_spacing (MxTable *table
,gint spacing
);
Sets the amount of spacing between columns.
|
a MxTable |
|
spacing in pixels |
gint mx_table_get_column_spacing (MxTable *table
);
Gets the amount of spacing between columns.
|
a MxTable |
Returns : |
the spacing between columns in device units |
void mx_table_set_row_spacing (MxTable *table
,gint spacing
);
Sets the amount of spacing between rows.
|
a MxTable |
|
spacing in pixels |
gint mx_table_get_row_spacing (MxTable *table
);
Gets the amount of spacing between rows.
|
a MxTable |
Returns : |
the spacing between rows in device units |
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
|
a MxTable |
|
the child to insert |
|
the row to place the child into |
|
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.
|
a MxTable |
|
the child ClutterActor |
|
the row to place the child into |
|
the column to place the child into |
|
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
|
A MxTable |
Returns : |
the number of rows |
"column-count"
property "column-count" gint : Read
The number of columns in the table.
Allowed values: >= 0
Default value: 0
"column-spacing"
property "column-spacing" gint : Read / Write
Spacing between columns.
Allowed values: >= 0
Default value: 0
"row-count"
property "row-count" gint : Read
The number of rows in the table.
Allowed values: >= 0
Default value: 0