[cairo-commit] goocanvas/docs overview.xml,1.1,1.2

Damon Chaplin commit at pdx.freedesktop.org
Tue Mar 6 04:08:22 PST 2007

Committed by: damon

Update of /cvs/cairo/goocanvas/docs
In directory kemper:/tmp/cvs-serv2122/docs

Modified Files:
Log Message:
2007-03-06  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasitem.[hc]: added get_requested_height() method.

	* src/goocanvastable.c: Reworked a lot of code to support
	width-for-height layout. This gets the requested area of all children,
	calculates the column widths, then checks if any children want to
	change their requested height given their allocated width. Text items
	change their requested height based on their width, so this results in
	a better layout.

	* src/goocanvastext.h (struct _GooCanvasText): added layout_width to
	store the width used for the PangoLayout. This initially comes from
	the text's width property, but can be modified when the text item
	is layed out in a container like GooCanvasTable.

	* src/goocanvastext.c (goo_canvas_text_get_requested_height):
	calculates the requested height for the given width, or just returns
	-1 if the text item is rotated or has a clip path, in which case the
	original height is used.
	(goo_canvas_text_init, goo_canvas_text_create_layout) 
	(goo_canvas_text_update): use layout_width.

	* demo/demo-table.c (create_width_for_height_table): added tests for
	width-for-height layout.

	* demo/demo-clipping.c (setup_canvas): added text item to check
	clipping works OK with them.

Index: overview.xml
RCS file: /cvs/cairo/goocanvas/docs/overview.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- overview.xml	8 Feb 2007 22:56:45 -0000	1.1
+++ overview.xml	6 Mar 2007 12:08:15 -0000	1.2
@@ -26,6 +26,8 @@
       Path item, using SVG path specification strings.
       Table item for layout of other items (similar to the GtkTable widget).
+      (This also supports items whose requested height changes according to
+      their allocated width, such as text items.)
       Embedded GTK+ widgets.

More information about the cairo-commit mailing list