![]() |
![]() |
![]() |
GooCanvas Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Child Properties |
struct GooCanvasTableModel; GooCanvasItemModel * goo_canvas_table_model_new (GooCanvasItemModel *parent
,...
);
GObject +----GooCanvasItemModelSimple +----GooCanvasGroupModel +----GooCanvasTableModel
"column-spacing" gdouble : Read / Write "homogeneous-columns" gboolean : Read / Write "homogeneous-rows" gboolean : Read / Write "horz-grid-line-width" gdouble : Read / Write "row-spacing" gdouble : Read / Write "vert-grid-line-width" gdouble : Read / Write "x-border-spacing" gdouble : Read / Write "y-border-spacing" gdouble : Read / Write
"bottom-padding" gdouble : Read / Write "column" guint : Read / Write "columns" guint : Read / Write "left-padding" gdouble : Read / Write "right-padding" gdouble : Read / Write "row" guint : Read / Write "rows" guint : Read / Write "top-padding" gdouble : Read / Write "x-align" gdouble : Read / Write "x-expand" gboolean : Read / Write "x-fill" gboolean : Read / Write "x-shrink" gboolean : Read / Write "y-align" gdouble : Read / Write "y-expand" gboolean : Read / Write "y-fill" gboolean : Read / Write "y-shrink" gboolean : Read / Write
GooCanvasTableModel is a model for a table container used to lay out other canvas items. It is used in a similar way to how the GtkTable widget is used to lay out GTK+ widgets.
Item models are added to the table using the normal methods, then
goo_canvas_item_model_set_child_properties()
is used to specify how each
child item is to be positioned within the table (i.e. which row and column
it is in, how much padding it should have and whether it should expand or
shrink).
GooCanvasTableModel is a subclass of GooCanvasItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a GooCanvasTableModel will affect all children of the GooCanvasTableModel (unless the children override the property setting).
GooCanvasTableModel implements the GooCanvasItemModel interface, so you
can use the GooCanvasItemModel functions such as
goo_canvas_item_model_raise()
and goo_canvas_item_rotate()
, and the
properties such as "visibility" and "pointer-events".
To create a GooCanvasTableModel use goo_canvas_table_model_new()
.
To get or set the properties of an existing GooCanvasTableModel, use
g_object_get()
and g_object_set()
.
struct GooCanvasTableModel;
The GooCanvasTableModel struct contains private data only.
GooCanvasItemModel * goo_canvas_table_model_new (GooCanvasItemModel *parent
,...
);
Creates a new table model.
|
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 g_object_unref() to free it. [skip]
|
|
optional pairs of property names and values, and a terminating NULL . |
Returns : |
a new table model. [transfer full] |
Here's an example showing how to create a table with a square, a circle and a triangle in it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |