pygoocanvas r228 - in trunk: . docs docs/reference
- From: gianmt svn gnome org
- To: svn-commits-list gnome org
- Subject: pygoocanvas r228 - in trunk: . docs docs/reference
- Date: Fri, 7 Nov 2008 23:30:37 +0000 (UTC)
Author: gianmt
Date: Fri Nov 7 23:30:37 2008
New Revision: 228
URL: http://svn.gnome.org/viewvc/pygoocanvas?rev=228&view=rev
Log:
Update docs with new API.
Added:
trunk/docs/reference/pygoocanvas-grid-model.xml
trunk/docs/reference/pygoocanvas-grid.xml
Modified:
trunk/ChangeLog
trunk/docs/Makefile.am
trunk/docs/reference/pygoocanvas-canvas.xml
trunk/docs/reference/pygoocanvas-ellipse-model.xml
trunk/docs/reference/pygoocanvas-hierarchy.xml
trunk/docs/reference/pygoocanvas-model-items.xml
trunk/docs/reference/pygoocanvas-ref.xml
trunk/docs/reference/pygoocanvas-std-items.xml
Modified: trunk/docs/Makefile.am
==============================================================================
--- trunk/docs/Makefile.am (original)
+++ trunk/docs/Makefile.am Fri Nov 7 23:30:37 2008
@@ -6,97 +6,101 @@
HTML_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/ref-html-style.xsl
PDF_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/pdf-style.xsl
-XMLFILES = \
- reference/pygoocanvas-ref.xml \
- reference/pygoocanvas-hierarchy.xml \
- reference/pygoocanvas-core-classes.xml \
- reference/pygoocanvas-std-items.xml \
- reference/pygoocanvas-model-items.xml \
- reference/pygoocanvas-misc-items.xml \
- reference/pygoocanvas-canvas.xml \
- reference/pygoocanvas-item.xml \
- reference/pygoocanvas-item-simple.xml \
- reference/pygoocanvas-item-model.xml \
- reference/pygoocanvas-item-model-simple.xml \
- reference/pygoocanvas-style.xml \
- reference/pygoocanvas-ellipse.xml \
- reference/pygoocanvas-ellipse-model.xml \
- reference/pygoocanvas-group.xml \
- reference/pygoocanvas-group-model.xml \
- reference/pygoocanvas-image.xml \
- reference/pygoocanvas-image-model.xml \
- reference/pygoocanvas-misc.xml \
- reference/pygoocanvas-path.xml \
- reference/pygoocanvas-path-model.xml \
- reference/pygoocanvas-polyline.xml \
- reference/pygoocanvas-polyline-model.xml \
- reference/pygoocanvas-rect.xml \
- reference/pygoocanvas-rect-model.xml \
- reference/pygoocanvas-text.xml \
- reference/pygoocanvas-table.xml \
- reference/pygoocanvas-table-model.xml \
- reference/pygoocanvas-text-model.xml \
+XMLFILES = \
+ reference/pygoocanvas-ref.xml \
+ reference/pygoocanvas-hierarchy.xml \
+ reference/pygoocanvas-core-classes.xml \
+ reference/pygoocanvas-std-items.xml \
+ reference/pygoocanvas-model-items.xml \
+ reference/pygoocanvas-misc-items.xml \
+ reference/pygoocanvas-canvas.xml \
+ reference/pygoocanvas-item.xml \
+ reference/pygoocanvas-item-simple.xml \
+ reference/pygoocanvas-item-model.xml \
+ reference/pygoocanvas-item-model-simple.xml \
+ reference/pygoocanvas-style.xml \
+ reference/pygoocanvas-ellipse.xml \
+ reference/pygoocanvas-ellipse-model.xml \
+ reference/pygoocanvas-grid.xml \
+ reference/pygoocanvas-grid-model.xml \
+ reference/pygoocanvas-group.xml \
+ reference/pygoocanvas-group-model.xml \
+ reference/pygoocanvas-image.xml \
+ reference/pygoocanvas-image-model.xml \
+ reference/pygoocanvas-misc.xml \
+ reference/pygoocanvas-path.xml \
+ reference/pygoocanvas-path-model.xml \
+ reference/pygoocanvas-polyline.xml \
+ reference/pygoocanvas-polyline-model.xml \
+ reference/pygoocanvas-rect.xml \
+ reference/pygoocanvas-rect-model.xml \
+ reference/pygoocanvas-text.xml \
+ reference/pygoocanvas-table.xml \
+ reference/pygoocanvas-table-model.xml \
+ reference/pygoocanvas-text-model.xml \
reference/pygoocanvas-widget.xml
HTMLdir = $(datadir)/gtk-doc/html/pygoocanvas
-HTML_DATA = \
- html/class-hierarchy.html \
- html/pygoocanvas-core-classes.html \
- html/pygoocanvas-std-items.html \
- html/pygoocanvas-model-items.html \
- html/pygoocanvas-misc-items.html \
- html/class-canvas.html \
- html/class-canvas-item.html \
- html/class-canvas-item-simple.html \
- html/class-canvas-item-model.html \
+HTML_DATA = \
+ html/class-hierarchy.html \
+ html/pygoocanvas-core-classes.html \
+ html/pygoocanvas-std-items.html \
+ html/pygoocanvas-model-items.html \
+ html/pygoocanvas-misc-items.html \
+ html/class-canvas.html \
+ html/class-canvas-item.html \
+ html/class-canvas-item-simple.html \
+ html/class-canvas-item-model.html \
html/class-canvas-item-model-simple.html \
- html/class-canvas-style.html \
- html/class-canvas-ellipse.html \
- html/class-canvas-ellipse-model.html \
- html/class-canvas-group.html \
- html/class-canvas-group-model.html \
- html/class-canvas-image.html \
- html/class-canvas-image-model.html \
- html/class-canvas-misc.html \
- html/class-canvas-path.html \
- html/class-canvas-path-model.html \
- html/class-canvas-polyline.html \
- html/class-canvas-polyline-model.html \
- html/class-canvas-rect.html \
- html/class-canvas-rect-model.html \
- html/class-canvas-text.html \
- html/class-canvas-table.html \
- html/class-canvas-table-model.html \
- html/class-canvas-text-model.html \
- html/class-canvas-widget.html \
- html/index.html \
- html/index.sgml \
+ html/class-canvas-style.html \
+ html/class-canvas-ellipse.html \
+ html/class-canvas-ellipse-model.html \
+ html/class-canvas-grid.html \
+ html/class-canvas-grid-model.html \
+ html/class-canvas-group.html \
+ html/class-canvas-group-model.html \
+ html/class-canvas-image.html \
+ html/class-canvas-image-model.html \
+ html/class-canvas-misc.html \
+ html/class-canvas-path.html \
+ html/class-canvas-path-model.html \
+ html/class-canvas-polyline.html \
+ html/class-canvas-polyline-model.html \
+ html/class-canvas-rect.html \
+ html/class-canvas-rect-model.html \
+ html/class-canvas-text.html \
+ html/class-canvas-table.html \
+ html/class-canvas-table-model.html \
+ html/class-canvas-text-model.html \
+ html/class-canvas-widget.html \
+ html/index.html \
+ html/index.sgml \
html/pygoocanvas.devhelp
CSS_FILES = $(PYGOBJECT_PYGDOCS)/style.css
CSSdir = $(HTMLdir)
CSS_DATA = $(CSS_FILES)
-BUILT_SOURCES = \
- build_stamp \
+BUILT_SOURCES = \
+ build_stamp \
reference/builddate.xml \
$(HTML_DATA)
-CLEANFILES = \
- build_stamp \
- pygoocanvas-ref.* \
+CLEANFILES = \
+ build_stamp \
+ pygoocanvas-ref.* \
reference/builddate.xml \
$(HTML_DATA)
EXTRA_DIST = \
$(XMLFILES) \
- $(XSLFILES) \
+ $(XSLFILES) \
$(FIX_XREF)
REFERENCE_DEPS = \
- reference \
- $(XMLFILES) \
+ reference \
+ $(XMLFILES) \
$(XSLFILES)
$(HTML_DATA): build_stamp
@@ -109,15 +113,15 @@
build_stamp: $(REFERENCE_DEPS)reference/builddate.xml
xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
--path $(BUILDDIR)/reference:$(srcdir)/reference \
- --stringparam gtkdoc.bookname "pygoocanvas" \
- --stringparam gtkdoc.version ${REF_VERSION} \
- $(HTML_STYLE) $(srcdir)/reference/pygoocanvas-ref.xml
+ --stringparam gtkdoc.bookname "pygoocanvas" \
+ --stringparam gtkdoc.version ${REF_VERSION} \
+ $(HTML_STYLE) $(srcdir)/reference/pygoocanvas-ref.xml
$(PYGOBJECT_FIXXREF) -i /usr/share/gtk-doc/html/pygtk/ $(BUILDDIR)/html
touch $@
pdf: $(REFERENCE_DEPS) reference/builddate.xml
xsltproc --nonet --xinclude -o pygoocanvas-ref.fo \
- $(PDF_STYLE) reference/pygoocanvas-ref.xml
+ $(PDF_STYLE) reference/pygoocanvas-ref.xml
pdfxmltex pygoocanvas-ref.fo >output </dev/null
endif
Modified: trunk/docs/reference/pygoocanvas-canvas.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-canvas.xml (original)
+++ trunk/docs/reference/pygoocanvas-canvas.xml Fri Nov 7 23:30:37 2008
@@ -22,6 +22,11 @@
</constructorsynopsis>
<methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--convert-bounds-to-item-space">convert_bounds_to_item_space</link></methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ <methodparam><parameter role="keyword">bounds</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
<methodname><link linkend="method-goocanvas--convert-from-item-space">convert_from_item_space</link></methodname>
<methodparam><parameter role="keyword">item</parameter></methodparam>
<methodparam><parameter role="keyword">x</parameter></methodparam>
@@ -95,6 +100,14 @@
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--get-static-root-item">get_static_root_item</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--get-static-root-item-model">get_static_root_item_model</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
<methodname><link linkend="method-goocanvas--grab-focus">grab_focus</link></methodname>
<methodparam><parameter role="keyword">item</parameter></methodparam>
</methodsynopsis>
@@ -132,6 +145,11 @@
<methodparam><parameter role="keyword">scale</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--request-item-redraw">request_item_redraw</link></methodname>
+ <methodparam><parameter role="keyword">bounds</parameter></methodparam>
+ <methodparam><parameter role="keyword">is_static</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
<methodname><link linkend="method-goocanvas--request-redraw">request_redraw</link></methodname>
<methodparam><parameter role="keyword">bounds</parameter></methodparam>
</methodsynopsis>
@@ -164,6 +182,14 @@
<methodparam><parameter role="keyword">scale</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--set-static-root-item">set_static_root_item</link></methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-goocanvas--set-static-root-item-model">set_static_root_item_model</link></methodname>
+ <methodparam><parameter role="keyword">model</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
<methodname><link linkend="method-goocanvas--unregister-item">unregister_item</link></methodname>
<methodparam><parameter role="keyword">model</parameter></methodparam>
</methodsynopsis>
@@ -376,6 +402,34 @@
<refsect1>
<title>Methods</title>
+ <refsect2 id="method-goocanvas--convert-bounds-to-item-space">
+ <title>goocanvas.Canvas.convert_bounds_to_item_space</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>convert_bounds_to_item_space</methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ <methodparam><parameter role="keyword">bounds</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">item</parameter> :</term>
+ <listitem><simpara>A <link linkend="class-canvas-item">goocanvas.Item
+ </link></simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">bounds</parameter> :</term>
+ <listitem><simpara>the bounds in device space.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Converts the bound in device space to a bounding box in item space.
+ This is useful in the item paint() methods to convert the bounds to
+ be painted to the item's coordinate space.
+ </para>
+ </refsect2>
+
<refsect2 id="method-goocanvas--convert-from-item-space">
<title>goocanvas.Canvas.convert_from_item_space</title>
@@ -812,6 +866,44 @@
Gets the current scale of the canvas, i.e. the number of pixels to use for each device unit.
</para>
</refsect2>
+
+ <refsect2 id="method-goocanvas--get-static-root-item">
+ <title>goocanvas.Canvas.get_static_root_item</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_static_root_item</methodname>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>the static root item, or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Gets the static root item of the canvas.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-goocanvas--get-static-root-item-model">
+ <title>goocanvas.Canvas.get_static_root_item_model</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_static_root_item_model</methodname>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>the static root item model, or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Gets the static root item model of the canvas.
+ </para>
+ </refsect2>
<refsect2 id="method-goocanvas--grab-focus">
<title>goocanvas.Canvas.grab_focus</title>
@@ -1018,6 +1110,31 @@
<para>Renders all or part of a canvas to the given cairo context.</para>
</refsect2>
+ <refsect2 id="method-goocanvas--request-item-redraw">
+ <title>goocanvas.Canvas.request_item_redraw</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>request_item_redraw</methodname>
+ <methodparam><parameter role="keyword">bounds</parameter></methodparam>
+ <methodparam><parameter role="keyword">is_static</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">bounds</parameter> :</term>
+ <listitem><simpara>the bounds of the item to redraw.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">is_static</parameter> :</term>
+ <listitem><simpara>if the item is static.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Requests that the given bounds be redrawn.
+ </para>
+ </refsect2>
+
<refsect2 id="method-goocanvas--request-redraw">
<title>goocanvas.Canvas.request_redraw</title>
@@ -1182,6 +1299,46 @@
</para>
</refsect2>
+ <refsect2 id="method-goocanvas--set-static-root-item">
+ <title>goocanvas.Canvas.set_static_root_item</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_static_root_item</methodname>
+ <methodparam><parameter role="keyword">item</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">item</parameter> :</term>
+ <listitem><simpara>the static root item.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Sets the static root item. Any existing static items are removed.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-goocanvas--set-static-root-item-model">
+ <title>goocanvas.Canvas.set_static_root_item_model</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_static_root_item_model</methodname>
+ <methodparam><parameter role="keyword">model</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">model</parameter> :</term>
+ <listitem><simpara>the static root item model.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Sets the static root item model. Any existing static items are removed.
+ </para>
+ </refsect2>
+
<refsect2 id="method-goocanvas--unregister-item">
<title>goocanvas.Canvas.unregister_item</title>
Modified: trunk/docs/reference/pygoocanvas-ellipse-model.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-ellipse-model.xml (original)
+++ trunk/docs/reference/pygoocanvas-ellipse-model.xml Fri Nov 7 23:30:37 2008
@@ -89,8 +89,8 @@
and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
It also implements the <link linkend="class-canvas-item-model"><classname>goocanvas.ItemModel</classname></link>
interface, so you can use the <link linkend="class-canvas-item-model"><classname>goocanvas.ItemModel</classname></link>
- functions such as <methodname><link linkend="method-goocanvasitem--raise-">goocanvas.Item.raise_()</link></methodname>
- and <methodname><link linkend="method-goocanvasitem--rotate-">goocanvas.Item.rotate()</link></methodname>.
+ functions such as <methodname><link linkend="method-goocanvasitemmodel--raise-">goocanvas.ItemModel.raise_()</link></methodname>
+ and <methodname><link linkend="method-goocanvasitemmodel--rotate-">goocanvas.ItemModel.rotate()</link></methodname>.
To respond to events such as mouse clicks on the ellipse you must connect to the signal handlers
of the corresponding <link linkend="class-canvas-ellipse"><classname>goocanvas.Ellipse</classname></link>
objects. (See <methodname><link linkend="method-goocanvas--get-item">get_item</link></methodname> and
Added: trunk/docs/reference/pygoocanvas-grid-model.xml
==============================================================================
--- (empty file)
+++ trunk/docs/reference/pygoocanvas-grid-model.xml Fri Nov 7 23:30:37 2008
@@ -0,0 +1,266 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-canvas-grid-model">
+
+ <refnamediv>
+ <refname>goocanvas.GridModel</refname>
+ <refpurpose>A model for grid items.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>goocanvas.GridModel</classname></ooclass>
+ <ooclass><classname>goocanvas.ItemModelSimple</classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-canvas-grid-model">goocanvas.GridModel</link></methodname>
+ <methodparam><parameter role="keyword">properties</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis>
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-canvas-item-model-simple">goocanvas.ItemModelSimple</link>
+ +-- <link linkend="class-canvas-grid-model">goocanvas.GridModel</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-goocanvasgridmodel">
+ <title>goocanvas.GridModel Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="3.5in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"border_color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the border. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the border, specified as a 32-bit integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the border with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the border.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the border around the grid. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"height"</entry>
+ <entry>Read/Write</entry>
+ <entry>The height of the grid. Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the horizontal grid lines. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the horizontal grid lines, specified as a 32-bit
+ integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the horizontal grid lines with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the horizontal grid lines.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the horizontal grid lines. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the vertical grid lines. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the vertical grid lines, specified as a 32-bit
+ integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the vertical grid lines with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the vertical grid lines.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the vertical grid lines. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the grid. Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x"</entry>
+ <entry>Read/Write</entry>
+ <entry>The x coordinate of the grid. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x-offset"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance before the first vertical grid line.
+ Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x-step"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance between the vertical grid lines.
+ Allowed values: >= 0. Default value: 10.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y"</entry>
+ <entry>Read/Write</entry>
+ <entry>The y coordinate of the grid. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y-offset"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance before the first horizontal grid line.
+ Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y-step"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance between the horizontal grid lines.
+ Allowed values: >= 0. Default value: 10.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-canvas-grid-model"><classname>goocanvas.GridModel</classname></link>
+ implements
+ <link linkend="class-canvas-item-model"><classname>goocanvas.ItemModel</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <link linkend="class-canvas-grid-model"><classname>goocanvas.GridModel</classname></link> represents a model for grid items.
+ It is a subclass of <link linkend="class-canvas-item-model-simple"><classname>goocanvas.ItemModelSimple</classname></link>
+ and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
+ It also implements the <link linkend="class-canvas-item-model"><classname>goocanvas.ItemModel</classname></link>
+ interface, so you can use the <link linkend="class-canvas-item-model"><classname>goocanvas.ItemModel</classname></link>
+ functions such as <methodname><link linkend="method-goocanvasitemmodel--raise-">goocanvas.ItemModel.raise_()</link></methodname>
+ and <methodname><link linkend="method-goocanvasitemmodel--rotate">goocanvas.ItemModel.rotate()</link></methodname>.
+ To respond to events such as mouse clicks on the ellipse you must connect to the signal handlers
+ of the corresponding <link linkend="class-canvas-grid"><classname>goocanvas.Grid</classname></link>
+ objects. (See <methodname><link linkend="method-goocanvas--get-item">get_item</link></methodname> and
+ GooCanvas::item-created.)
+ </refsect1>
+
+ <refsect1 id="constructor-canvas-grid-model">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>goocanvas.GridModel</methodname>
+ <methodparam><parameter role="keyword">properties</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">properties</parameter> :</term>
+ <listitem><simpara>A comma separated list of properties.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>A new
+ <link linkend="class-canvas-grid-model"><classname>goocanvas.GridModel</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Creates a new canvas grid model.
+ </para>
+ <para>
+ Here's an example showing how to create a grid model:
+ </para>
+<programlisting>
+grid = goocanvas.GridModel(parent=root,
+ x=100,
+ y=100,
+ width=400,
+ height=200,
+ x_step=20,
+ Y_step=20,
+ x_offset=10,
+ y_offset=10,
+ horz_grid_line_width=4.0,
+ horz_grid_line_color="yellow",
+ vert_grid_line_width=2.0,
+ vert_grid_line_color="red",
+ border_width=3.0,
+ border_color="white",
+ fill_color="blue"
+ )
+</programlisting>
+ </refsect1>
+
+</refentry>
Added: trunk/docs/reference/pygoocanvas-grid.xml
==============================================================================
--- (empty file)
+++ trunk/docs/reference/pygoocanvas-grid.xml Fri Nov 7 23:30:37 2008
@@ -0,0 +1,262 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-canvas-grid">
+
+ <refnamediv>
+ <refname>goocanvas.Grid</refname>
+ <refpurpose>A grid item.</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>goocanvas.Grid</classname></ooclass>
+ <ooclass><classname>goocanvas.ItemSimple</classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-canvas-grid">goocanvas.Grid</link></methodname>
+ <methodparam><parameter role="keyword">properties</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis>
+ </classsynopsis>
+ </refsect1>
+
+ <refsect1>
+ <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+ +-- <link linkend="class-canvas-item-simple">goocanvas.ItemSimple</link>
+ +-- <link linkend="class-canvas-grid">goocanvas.Grid</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-goocanvasgrid">
+ <title>goocanvas.Grid Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="3.5in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"border_color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the border. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the border, specified as a 32-bit integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the border with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the border.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"border-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the border around the grid. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"height"</entry>
+ <entry>Read/Write</entry>
+ <entry>The height of the grid. Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the horizontal grid lines. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the horizontal grid lines, specified as a 32-bit
+ integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the horizontal grid lines with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the horizontal grid lines.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"horz-grid-line-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the horizontal grid lines. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-color"</entry>
+ <entry>Write</entry>
+ <entry>The color to use for the vertical grid lines. Default value: <literal>None</literal>.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-color-rgba"</entry>
+ <entry>Read/Write</entry>
+ <entry>The color to use for the vertical grid lines, specified as a 32-bit
+ integer value. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-pattern"</entry>
+ <entry>Read/Write</entry>
+ <entry>The cairo pattern to paint the vertical grid lines with.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-pixbuf"</entry>
+ <entry>Write</entry>
+ <entry>The pixbuf to use to draw the vertical grid lines.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"vert-grid-line-width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the vertical grid lines. Default value: -1.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"width"</entry>
+ <entry>Read/Write</entry>
+ <entry>The width of the grid. Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x"</entry>
+ <entry>Read/Write</entry>
+ <entry>The x coordinate of the grid. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x-offset"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance before the first vertical grid line.
+ Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"x-step"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance between the vertical grid lines.
+ Allowed values: >= 0. Default value: 10.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y"</entry>
+ <entry>Read/Write</entry>
+ <entry>The y coordinate of the grid. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y-offset"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance before the first horizontal grid line.
+ Allowed values: >= 0. Default value: 0.</entry>
+ </row>
+
+ <row valign="top">
+ <entry>"y-step"</entry>
+ <entry>Read/Write</entry>
+ <entry>The distance between the horizontal grid lines.
+ Allowed values: >= 0. Default value: 10.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+ </refsect1>
+
+ <refsect1>
+ <title>Implemented Interfaces</title>
+ <para>
+ <link linkend="class-canvas-grid"><classname>goocanvas.Grid</classname></link>
+ implements
+ <link linkend="class-canvas-item"><classname>goocanvas.Item</classname></link>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <link linkend="class-canvas-grid"><classname>goocanvas.Grid</classname></link> represents a grid item.
+ It is a subclass of <link linkend="class-canvas-item-simple"><classname>goocanvas.ItemSimple</classname></link>
+ and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
+ It also implements the <link linkend="class-canvas-item"><classname>goocanvas.Item</classname></link>
+ interface, so you can use the <link linkend="class-canvas-item"><classname>goocanvas.Item</classname></link>
+ functions such as <methodname><link linkend="method-goocanvasitem--raise-">goocanvas.Item.raise_()</link></methodname>
+ and <methodname><link linkend="method-goocanvasitem--rotate">goocanvas.Item.rotate()</link></methodname>
+ </refsect1>
+
+ <refsect1 id="constructor-canvas-grid">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>goocanvas.Grid</methodname>
+ <methodparam><parameter role="keyword">properties</parameter><initializer>None</initializer></methodparam>
+ </constructorsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">properties</parameter> :</term>
+ <listitem><simpara>A comma separated list of properties.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>A new
+ <link linkend="class-canvas-grid"><classname>goocanvas.Grid</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ Creates a new canvas grid item.
+ </para>
+ <para>
+ Here's an example showing how to create a grid:
+ </para>
+<programlisting>
+grid = goocanvas.Grid(parent=root,
+ x=100,
+ y=100,
+ width=400,
+ height=200,
+ x_step=20,
+ Y_step=20,
+ x_offset=10,
+ y_offset=10,
+ horz_grid_line_width=4.0,
+ horz_grid_line_color="yellow",
+ vert_grid_line_width=2.0,
+ vert_grid_line_color="red",
+ border_width=3.0,
+ border_color="white",
+ fill_color="blue"
+ )
+</programlisting>
+ </refsect1>
+
+</refentry>
Modified: trunk/docs/reference/pygoocanvas-hierarchy.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-hierarchy.xml (original)
+++ trunk/docs/reference/pygoocanvas-hierarchy.xml Fri Nov 7 23:30:37 2008
@@ -9,6 +9,7 @@
|
+--<link linkend="class-canvas-item-simple">goocanvas.ItemSimple</link> (implements <link linkend="class-canvas-item">goocanvas.Item</link>)
| +--<link linkend="class-canvas-ellipse">goocanvas.Ellipse</link>
+ | +--<link linkend="class-canvas-grid">goocanvas.Grid</link>
| +--<link linkend="class-canvas-image">goocanvas.Image</link>
| +--<link linkend="class-canvas-path">goocanvas.Path</link>
| +--<link linkend="class-canvas-polyline">goocanvas.Polyline</link>
@@ -18,6 +19,7 @@
|
+--<link linkend="class-canvas-item-model-simple">goocanvas.ItemModelSimple</link> (implements <link linkend="class-canvas-item-model">goocanvas.ItemModel</link>)
| +--<link linkend="class-canvas-ellipse-model">goocanvas.EllipseModel</link>
+ | +--<link linkend="class-canvas-grid-model">goocanvas.GridModel</link>
| +--<link linkend="class-canvas-image-model">goocanvas.ImageModel</link>
| +--<link linkend="class-canvas-path-model">goocanvas.PathModel</link>
| +--<link linkend="class-canvas-polyline-model">goocanvas.PolylineModel</link>
Modified: trunk/docs/reference/pygoocanvas-model-items.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-model-items.xml (original)
+++ trunk/docs/reference/pygoocanvas-model-items.xml Fri Nov 7 23:30:37 2008
@@ -6,6 +6,7 @@
<!-- GooCanvas OBJECTS -->
<xi:include href="pygoocanvas-ellipse-model.xml"/>
+ <xi:include href="pygoocanvas-grid-model.xml"/>
<xi:include href="pygoocanvas-group-model.xml"/>
<xi:include href="pygoocanvas-image-model.xml"/>
<xi:include href="pygoocanvas-path-model.xml"/>
Modified: trunk/docs/reference/pygoocanvas-ref.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-ref.xml (original)
+++ trunk/docs/reference/pygoocanvas-ref.xml Fri Nov 7 23:30:37 2008
@@ -8,7 +8,7 @@
<book id="pygoocanvas-reference" xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<pubdate>&builddate;</pubdate>
- <title>PyGooCanvas 0.6.0 Reference Manual</title>
+ <title>PyGooCanvas Reference Manual</title>
<edition>PyGooCanvas Reference Manual for PyGooCanvas &version;</edition>
<releaseinfo>For PyGooCanvas version &version;</releaseinfo>
<authorgroup>
Modified: trunk/docs/reference/pygoocanvas-std-items.xml
==============================================================================
--- trunk/docs/reference/pygoocanvas-std-items.xml (original)
+++ trunk/docs/reference/pygoocanvas-std-items.xml Fri Nov 7 23:30:37 2008
@@ -6,6 +6,7 @@
<!-- GooCanvas OBJECTS -->
<xi:include href="pygoocanvas-ellipse.xml"/>
+ <xi:include href="pygoocanvas-grid.xml"/>
<xi:include href="pygoocanvas-image.xml"/>
<xi:include href="pygoocanvas-group.xml"/>
<xi:include href="pygoocanvas-path.xml"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]