CanvasTableModel


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItemModel*" ) ]
public CanvasTableModel (CanvasItemModel? parent, ...)

Creates a new table model.

Here's an example showing how to create a table with a square, a circle and a triangle in it:

<informalexample><programlisting> GooCanvasItemModel *table, *square, *circle, *triangle;

table = goo_canvas_table_model_new (root, "row-spacing", 4.0, "column-spacing", 4.0, NULL); goo_canvas_item_model_translate (table, 400, 200);

square = goo_canvas_rect_model_new (table, 0.0, 0.0, 50.0, 50.0, "fill-color", "red", NULL); goo_canvas_item_model_set_child_properties ( table, square, "row", 0, "column", 0, NULL);

circle = goo_canvas_ellipse_model_new (table, 0.0, 0.0, 25.0, 25.0, "fill-color", "blue", NULL); goo_canvas_item_model_set_child_properties (table, circle, "row", 0, "column", 1, NULL);

triangle = goo_canvas_polyline_model_new (table, TRUE, 3, 25.0, 0.0, 0.0, 50.0, 50.0, 50.0, "fill-color", "yellow", NULL); goo_canvas_item_model_set_child_properties (table, triangle, "row", 0, "column", 2, NULL); </programlisting></informalexample>

Parameters:

parent

the parent model, or null. If a parent is specified, it will assume ownership of the item, and the item will automatically be freed when it is removed from the parent. Otherwise call unref to free it.

...

optional pairs of property names and values, and a terminating null.

Returns:

a new table model.