![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
enum NbtkTableChildOptions; NbtkTable; 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
,...
); gint nbtk_table_get_row_count (NbtkTable *table
); gint nbtk_table_get_column_count (NbtkTable *table
);
"col-spacing" gint : Read / Write "column-count" gint : Read "homogeneous" gboolean : Read / Write "row-count" gint : Read "row-spacing" gint : Read / Write
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.
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.
whether to respect the widget's aspect ratio | |
whether to allocate extra space on the widget's x-axis | |
whether to allocate extra space on the widget's y-axis | |
whether to stretch the child to fill the cell horizontally | |
whether to stretch the child to fill the cell vertically |
typedef struct _NbtkTable NbtkTable;
The contents of this structure is private and should only be accessed using the provided API.
NbtkWidget* nbtk_table_new (void
);
Create a new NbtkTable
Returns : |
a new NbtkTable |
void nbtk_table_set_col_spacing (NbtkTable *table
,gint spacing
);
Sets the amount of spacing between columns.
|
a NbtkTable |
|
spacing in pixels |
void nbtk_table_set_row_spacing (NbtkTable *table
,gint spacing
);
Sets the amount of spacing between rows.
|
a NbtkTable |
|
spacing in pixels |
gint nbtk_table_get_col_spacing (NbtkTable *table
);
Gets the amount of spacing between columns.
|
a NbtkTable |
Returns : |
the spacing between columns in device units |
gint nbtk_table_get_row_spacing (NbtkTable *table
);
Gets the amount of spacing between rows.
|
a NbtkTable |
Returns : |
the spacing between rows in device units |
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
|
a NbtkTable |
|
the child to insert |
|
the row to place the child into |
|
the column to place the child into |
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.
|
a NbtkTable |
|
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 nbtk_table_get_row_count (NbtkTable *table
);
Retrieve the current number rows in the table
|
A NbtkTable |
Returns : |
the number of rows |
"col-spacing"
property "col-spacing" gint : Read / Write
Spacing between columns.
Allowed values: >= 0
Default value: 0
"column-count"
property "column-count" gint : Read
The number of columns in the table.
Allowed values: >= 0
Default value: 0
"homogeneous"
property "homogeneous" gboolean : Read / Write
Homogeneous rows and columns.
Default value: TRUE
"row-count"
property "row-count" gint : Read
The number of rows in the table.
Allowed values: >= 0
Default value: 0