[cairo-commit] goocanvas/demo table-demo.c,1.2,1.3

Damon Chaplin commit at pdx.freedesktop.org
Fri Feb 2 13:54:05 PST 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/demo
In directory kemper:/tmp/cvs-serv26001/demo

Modified Files:
	table-demo.c 
Log Message:
2007-02-02  Damon Chaplin  <damon at gnome.org>

	* */*: updated docs for all canvas items & models.



Index: table-demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/table-demo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- table-demo.c	1 Feb 2007 01:19:05 -0000	1.2
+++ table-demo.c	2 Feb 2007 21:54:00 -0000	1.3
@@ -153,6 +153,44 @@
 }
 
 
+static void
+create_demo_table (GooCanvasItem *root)
+{
+  GooCanvasItem *table, *square, *circle, *triangle;
+
+  table = goo_canvas_table_new (root,
+                                "row-spacing", 4.0,
+                                "column-spacing", 4.0,
+                                NULL);
+  goo_canvas_item_translate (table, 400, 200);
+
+  square = goo_canvas_rect_new (table, 0.0, 0.0, 50.0, 50.0,
+				"fill-color", "red",
+				NULL);
+  goo_canvas_item_set_child_properties (table, square,
+					"row", 0,
+					"column", 0,
+					NULL);
+
+  circle = goo_canvas_ellipse_new (table, 0.0, 0.0, 25.0, 25.0,
+				   "fill-color", "blue",
+				   NULL);
+  goo_canvas_item_set_child_properties (table, circle,
+					"row", 0,
+					"column", 1,
+					NULL);
+
+  triangle = goo_canvas_polyline_new (table, TRUE, 3,
+				      25.0, 0.0, 0.0, 50.0, 50.0, 50.0,
+				      "fill-color", "yellow",
+				      NULL);
+  goo_canvas_item_set_child_properties (table, triangle,
+					"row", 0,
+					"column", 2,
+					NULL);
+}
+
+
 int
 main (int argc, char *argv[])
 {
@@ -201,6 +239,10 @@
   root = goo_canvas_get_root_item (GOO_CANVAS (canvas));
 
 #if 1
+  create_demo_table (root);
+#endif
+
+#if 1
   create_table (root, -1, -1, 0, 10, 10, 0, 1.0, DEMO_TEXT_ITEM);
   create_table (root, -1, -1, 0, 180, 10, 30, 1.0, DEMO_TEXT_ITEM);
   create_table (root, -1, -1, 0, 350, 10, 60, 1.0, DEMO_TEXT_ITEM);



More information about the cairo-commit mailing list