This file is indexed.

/usr/share/gtk-doc/html/pygoocanvas/class-canvas.html is in python-pygoocanvas 0.14.1-1.1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>goocanvas.Canvas</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="PyGooCanvas Reference Manual"><link rel="up" href="pygoocanvas-core-classes.html" title="PyGooCanvas Core Class Reference"><link rel="prev" href="pygoocanvas-core-classes.html" title="PyGooCanvas Core Class Reference"><link rel="next" href="class-canvas-item.html" title="goocanvas.Item"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">goocanvas.Canvas</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pygoocanvas-core-classes.html">Prev</a> </td><th width="60%" align="center">PyGooCanvas Core Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-canvas-item.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="class-canvas"></a><div class="titlepage"></div><div class="refnamediv"><h2>goocanvas.Canvas</h2><p>goocanvas.Canvas — The Canvas</p></div><div class="refsect1"><a name="idp46888208657792"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">goocanvas.Canvas</span></span>(<span class="ooclass"><span class="classname">gtk.Container</span></span>):
<code class="constructorsynopsis">    <span class="methodname">goocanvas.Canvas</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">convert_bounds_to_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">convert_from_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">convert_to_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">convert_from_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">convert_to_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">create_cairo_context</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">create_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_bounds</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_default_line_width</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_item_at</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_items_at</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_items_in_area</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>inside_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allow_overlaps</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>including_containers</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_root_item</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_root_item_model</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_scale</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_static_root_item</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_static_root_item_model</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">grab_focus</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">keyboard_grab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>owner_events</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">keyboard_ungrab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">pointer_grab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">pointer_ungrab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">register_widget_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>witem</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">render</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>scale</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">request_item_redraw</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_static</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">request_redraw</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">request_update</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">scroll_to</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_bounds</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bottom</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_root_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_root_item_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_scale</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>scale</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_static_root_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">set_static_root_item_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">unregister_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">unregister_widget_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>witem</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">update</span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1"><a name="idp46888209414128"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a
href="../pygobject/class-gobject.html"
>gobject.GObject</a>
	+-- gtk.Object
		+-- gtk.Widget
			+-- gtk.Container
				+-- goocanvas.Canvas
</pre></div><div class="refsect1"><a name="properties-goocanvas"></a><h2>goocanvas.Canvas Properties</h2><p>gtk.Object Properties</p><p>gtk.Widget Properties</p><p>gtk.Container Properties</p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"anchor"</td><td valign="top">Read/Write</td><td valign="top">Where to place the canvas when it is smaller than the widget's allocated area.
                                         Default value: gtk.ANCHOR_NORTH_WEST</td></tr><tr valign="top"><td valign="top">"automatic-bounds"</td><td valign="top">Read/Write</td><td valign="top">If the bounds are automatically calculated based
                                    on the bounds of all the items in the canvas.</td></tr><tr valign="top"><td valign="top">"bounds-from-origin"</td><td valign="top">Read/Write</td><td valign="top">If the automatic bounds are calculated from the origin.</td></tr><tr valign="top"><td valign="top">"bounds-padding"</td><td valign="top">Read/Write</td><td valign="top">The padding added to the automatic bounds.</td></tr><tr valign="top"><td valign="top">"clear-background"</td><td valign="top">Read/Write</td><td valign="top">If the background is cleared before the canvas is painted.
                            Default value: <code class="literal">True</code></td></tr><tr valign="top"><td valign="top">"integer-layout"</td><td valign="top">Read/Write</td><td valign="top">If all item layout is done to the nearest integer.</td></tr><tr valign="top"><td valign="top">"redraw-when-scrolled"</td><td valign="top">Read/Write</td><td valign="top">If the canvas is completely redrawn when scrolled, to
                            reduce the flicker of static items.
                            Default value: <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"resolution-x"</td><td valign="top">Read/Write</td><td valign="top">The horizontal resolution of the display, in dots per inch. Allowed values: &gt;= 0
                                         Default value: 96</td></tr><tr valign="top"><td valign="top">"resolution-y"</td><td valign="top">Read/Write</td><td valign="top">The vertical resolution of the display, in dots per inch. Allowed values: &gt;= 0
                                         Default value: 96</td></tr><tr valign="top"><td valign="top">"scale"</td><td valign="top">Read/Write</td><td valign="top">The number of pixels to use for each device unit. Allowed values: &gt;= 0
                                         Default value: 1</td></tr><tr valign="top"><td valign="top">"scale-x"</td><td valign="top">Read/Write</td><td valign="top">The horizontal magnification factor of the canvas.</td></tr><tr valign="top"><td valign="top">"scale-y"</td><td valign="top">Read/Write</td><td valign="top">The vertical magnification factor of the canvas.</td></tr><tr valign="top"><td valign="top">"x1"</td><td valign="top">Read/Write</td><td valign="top">The x coordinate of the left edge of the canvas bounds, in device units.
                                         Default value: 0.</td></tr><tr valign="top"><td valign="top">"x2"</td><td valign="top">Read/Write</td><td valign="top">The x coordinate of the right edge of the canvas bounds, in device units.
                                         Default value: 1000.</td></tr><tr valign="top"><td valign="top">"y1"</td><td valign="top">Read/Write</td><td valign="top">The y coordinate at the top edge of the canvas bounds, in device units.
                                         Default value: 0.</td></tr><tr valign="top"><td valign="top">"y2"</td><td valign="top">Read/Write</td><td valign="top">The y coordinate at the bottom edge of the canvas bounds, in device units.
                                         Default value: 1000.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1"><a name="signal-prototypes-goocanvas"></a><h2>goocanvas.Canvas Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"item-created"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>canvas</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>model</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"set-scroll-adjustments"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>canvas_view</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1"><a name="idp46888209477456"></a><h2>Description</h2><p>
                <code class="classname">goocanvas.Canvas</code>
                is the main widget containing a number of canvas items.
            </p></div><div class="refsect1"><a name="constructor-canvas"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">goocanvas.Canvas</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A new
					    <code class="classname">goocanvas.Canvas</code>
				    </td></tr></tbody></table><p>
		    Creates a new canvas.
	    </p></div><div class="refsect1"><a name="idp46888209485728"></a><h2>Methods</h2><div class="refsect2"><a name="method-goocanvas--convert-bounds-to-item-space"></a><h3>goocanvas.Canvas.convert_bounds_to_item_space</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_bounds_to_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>A goocanvas.Item
                            </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>the bounds in device space.</td></tr></tbody></table><p>
                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.
            </p></div><div class="refsect2"><a name="method-goocanvas--convert-from-item-space"></a><h3>goocanvas.Canvas.convert_from_item_space</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_from_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>A goocanvas.Item
                            </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate to convert.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate to convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The new x and y coordinates.</td></tr></tbody></table><p>
                Converts a coordinate from the given item's coordinate space to the canvas coordinate space,
                applying all transformation matrices including the item's own transformation matrix, if it has one.
            </p></div><div class="refsect2"><a name="method-goocanvas--convert-from-pixel"></a><h3>goocanvas.Canvas.convert_from_pixel</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_from_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate to convert.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate to convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The new x and y coordinates.</td></tr></tbody></table><p>
                Converts a coordinate from pixels to the canvas coordinate space.
                The pixel coordinate space specifies pixels from the top-left of the entire canvas window,
                according to the current scale setting. See
                <code class="methodname">set_scale()</code>.
                The canvas view coordinate space is specified in the call to
                <code class="methodname">set_bounds()</code>.
            </p></div><div class="refsect2"><a name="method-goocanvas--convert-to-item-space"></a><h3>goocanvas.Canvas.convert_to_item_space</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_to_item_space</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>A goocanvas.Item
                            </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate to convert.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate to convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The new x and y coordinates.</td></tr></tbody></table><p>
                Converts a coordinate from the canvas coordinate space to the given item's coordinate space,
                applying all transformation matrices including the item's own transformation matrix, if it has one.
            </p></div><div class="refsect2"><a name="method-goocanvas--convert-to-pixel"></a><h3>goocanvas.Canvas.convert_to_pixel</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_to_pixel</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate to convert.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate to convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The new x and y coordinates.</td></tr></tbody></table><p>
                Converts a coordinate from the canvas coordinate space to pixels.
                The canvas coordinate space is specified in the call to
                <code class="methodname">set_bounds</code>
                The pixel coordinate space specifies pixels from the top-left of the entire canvas window,
                according to the current scale setting. See
                <code class="methodname">set_scale</code>
            </p></div><div class="refsect2"><a name="method-goocanvas--create-cairo-context"></a><h3>goocanvas.Canvas.create_cairo_context</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_cairo_context</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>a new cairo context.</td></tr></tbody></table><p>
                Creates a cairo context, initialized with the default canvas settings.
            </p></div><div class="refsect2"><a name="method-goocanvas--create-item"></a><h3>goocanvas.Canvas.create_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>model</code></strong>:</span></p></td><td>The item model to create a canvas item for.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A new canvas item.</td></tr></tbody></table><p>
                Creates a new canvas item for the given item model, and recursively creates items for any children.
                It uses the create_item virtual method if it has been set.
                Subclasses of GooCanvas can define this method if they want to use custom views for items.
                It emits the "item-created" signal after
                creating the view, so application code can connect signal handlers to the new view if desired.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-bounds"></a><h3>goocanvas.Canvas.get_bounds</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_bounds</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A tuple with the four coordinates.</td></tr></tbody></table><p>
                Gets the bounds of the canvas, in canvas units. By default, canvas units are pixels,
                though the GooCanvas:units property can be used to change the units to points,
                inches or millimeters.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-default-line-width"></a><h3>goocanvas.Canvas.get_default_line_width</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_default_line_width</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The default line width of the canvas.</td></tr></tbody></table><p>
                Gets the default line width, which depends on the current units setting.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-item"></a><h3>goocanvas.Canvas.get_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>model</code></strong>:</span></p></td><td>A
                            <code class="classname">goocanvas.ItemModel</code>
                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The canvas item corresponding to the given
                                            <code class="classname">goocanvas.ItemModel</code>
                                            or None if no canvas item has been created for it yet.
                    </td></tr></tbody></table><p>
                Gets the canvas item associated with the given
                <code class="classname">goocanvas.ItemModel</code>.
                This is only useful when set_root_item_model
                has been used to set a model for the canvas.
            </p><p>
                For simple applications you can use get_item
                to set up signal handlers for your items, e.g.
            </p><pre class="programlisting">
                item = canvas.get_item (my_item)
                item.connect ("button_press_event", on_my_item_button_press)</pre><p>
                More complex applications may want to use the GooCanvas::item-created signal to hook up their signal handlers.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-item-at"></a><h3>goocanvas.Canvas.get_item_at</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_item_at</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate of the point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate of the point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>is_pointer_event</code></strong>:</span></p></td><td>True if the "pointer-events" property of items should be used
                                                         to determine which parts of the item are tested.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The item found at the given point, or None if no item was found.</td></tr></tbody></table><p>Gets the item at the given point.</p></div><div class="refsect2"><a name="method-goocanvas--get-items-at"></a><h3>goocanvas.Canvas.get_items_at</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_items_at</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong>:</span></p></td><td>The x coordinate of the point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The y coordinate of the point.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>is_pointer_event</code></strong>:</span></p></td><td>True if the "pointer-events" property of items should be used
                                                         to determine which parts of the item are tested.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A list of items found at the given point, with the top item at
                                                         the start of the list, or None if no items were found. </td></tr></tbody></table><p>Gets all items at the given point.</p></div><div class="refsect2"><a name="method-goocanvas--get-items-in-area"></a><h3>goocanvas.Canvas.get_items_in_area</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_items_in_area</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>inside_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allow_overlaps</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>include_containers</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>area</code></strong>:</span></p></td><td>The area to compare with each item's bounds.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>inside_area</code></strong>:</span></p></td><td>True if items inside area should be returned, or False if items outside
                                                         area should be returned.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>allow_overlaps</code></strong>:</span></p></td><td>True if items which are partly inside and partly outside
                                                         should be returned.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>include_containers</code></strong>:</span></p></td><td>True if containers should be checked as well as normal items.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A list of items in the given area, or None if no items are found.</td></tr></tbody></table><p>
                Gets a list of items inside or outside a given area.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-root-item"></a><h3>goocanvas.Canvas.get_root_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_root_item</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The root item, or None if there is no root item.</td></tr></tbody></table><p>
                Gets the root item of the canvas, usually a
                <code class="classname">goocanvas.Group</code>.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-root-item-model"></a><h3>goocanvas.Canvas.get_root_item_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_root_item_model</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The root item model, or None if there is no root item.</td></tr></tbody></table><p>
                Gets the root item model of the canvas, usually a
                <code class="classname">goocanvas.GroupModel</code>.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-scale"></a><h3>goocanvas.Canvas.get_scale</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_scale</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The current scale setting.</td></tr></tbody></table><p>
                Gets the current scale of the canvas, i.e. the number of pixels to use for each device unit.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-static-root-item"></a><h3>goocanvas.Canvas.get_static_root_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_static_root_item</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>the static root item, or <code class="literal">None</code>.</td></tr></tbody></table><p>
                Gets the static root item of the canvas.
            </p></div><div class="refsect2"><a name="method-goocanvas--get-static-root-item-model"></a><h3>goocanvas.Canvas.get_static_root_item_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_static_root_item_model</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>the static root item model, or <code class="literal">None</code>.</td></tr></tbody></table><p>
                Gets the static root item model of the canvas.
            </p></div><div class="refsect2"><a name="method-goocanvas--grab-focus"></a><h3>goocanvas.Canvas.grab_focus</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">grab_focus</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The item to grab the focus.</td></tr></tbody></table><p>Grabs the keyboard focus for the given item.</p></div><div class="refsect2"><a name="method-goocanvas--keyword-grab"></a><h3>goocanvas.Canvas.keyboard_grab</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">keyboard_grab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>owner_events</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The item to grab the keyword for.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>owner_events</code></strong>:</span></p></td><td><code class="literal">True</code> if keyboard events for this application
                            will be reported normally, or <code class="literal">False</code> if all keyboard events will
                            be reported with respect to the grab item.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong>:</span></p></td><td>The time of the event that lead to the keyboard grab.
                            This should come from the relevant
                            <code class="classname">gtk.gdk.Event</code>
                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>gtk.gdk.GRAB_SUCCESS if the grab succeeded.</td></tr></tbody></table><p>Grabs the keyboard focus for the given item.</p></div><div class="refsect2"><a name="method-goocanvas--keyboard-ungrab"></a><h3>goocanvas.Canvas.keyboard_ungrab</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">keyboard_grab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The item that has the keyboard grab.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong>:</span></p></td><td>The time of the event that lead to the keyboard ungrab.
                            This should come from the relevant
                            <code class="classname">gtk.gdk.Event</code>
                    </td></tr></tbody></table><p>Ungrabs the pointer, if the given item view has the pointer grab.</p></div><div class="refsect2"><a name="method-goocanvas--pointer-grab"></a><h3>goocanvas.Canvas.pointer_grab</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pointer_grab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The item to grab the pointer for.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>event_mask</code></strong>:</span></p></td><td>The events to receive during the grab.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cursor</code></strong>:</span></p></td><td>The cursor to display during the grab, or <code class="literal">None</code>.
                    </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong>:</span></p></td><td>The time of the event that lead to the pointer grab.
                            This should come from the relevant
                            <code class="classname">gtk.gdk.Event</code>.
                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>gtk.gdk.GRAB_SUCCESS if the grab succeeded.</td></tr></tbody></table><p>Attempts to grab the pointer for the given item.</p></div><div class="refsect2"><a name="method-goocanvas--pointer-ungrab"></a><h3>goocanvas.Canvas.pointer_ungrab</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pointer_ungrab</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The item that has the pointer grab.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong>:</span></p></td><td>The time of the event that lead to the pointer ungrab.
                            This should come from the relevant
                            <code class="classname">gtk.gdk.Event</code>
                        </td></tr></tbody></table><p>Ungrabs the pointer, if the given item view has the pointer grab.</p></div><div class="refsect2"><a name="method-goocanvas--register-widget-item"></a><h3>goocanvas.Canvas.register_widget_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">register_widget_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>witem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>witem</code></strong>:</span></p></td><td>A <code class="classname">goocanvas.Widget</code>.
                    </td></tr></tbody></table><p>Registers a widget item with the canvas, so that the canvas can do the necessary
                actions to move and resize the widget as needed.
            </p><p>
                This function should only be used by
                <code class="classname">goocanvas.Widget</code>
                and subclass implementations.
            </p></div><div class="refsect2"><a name="method-goocanvas--render"></a><h3>goocanvas.Canvas.render</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">render</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>scale</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cr</code></strong>:</span></p></td><td>A cairo context.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>The area to render, or <code class="literal">None</code>
                            to render the entire canvas.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>scale</code></strong>:</span></p></td><td>The scale to compare with each item's visibility threshold to see
                            if they should be rendered. This only affects items that have their visibility set
                            to goocanvas.ITEM_VISIBLE_ABOVE_THRESHOLD.</td></tr></tbody></table><p>Renders all or part of a canvas to the given cairo context.</p></div><div class="refsect2"><a name="method-goocanvas--request-item-redraw"></a><h3>goocanvas.Canvas.request_item_redraw</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">request_item_redraw</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_static</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>the bounds of the item to redraw.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>is_static</code></strong>:</span></p></td><td>if the item is static.</td></tr></tbody></table><p>
                Requests that the given bounds be redrawn.
            </p></div><div class="refsect2"><a name="method-goocanvas--request-redraw"></a><h3>goocanvas.Canvas.request_redraw</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">request_redraw</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>bounds</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>bounds</code></strong>:</span></p></td><td>The bounds to redraw.</td></tr></tbody></table><p>Requests that the given bounds be redrawn.</p></div><div class="refsect2"><a name="method-goocanvas--request-update"></a><h3>goocanvas.Canvas.request_update</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">request_update</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
                Schedules an update of the
                <code class="classname">goocanvas.Canvas</code>.
                This will be performed in the idle loop, after all pending events have been handled,
                but before the canvas has been repainted.
            </p></div><div class="refsect2"><a name="method-goocanvas--scroll-to"></a><h3>goocanvas.Canvas.scroll_to</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">scroll_to</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong>:</span></p></td><td>The x coordinate to scroll to.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>top</code></strong>:</span></p></td><td>The y coordinate to scroll to.</td></tr></tbody></table><p>
                Scrolls the canvas, placing the given point as close to the top-left of
                the view as possible.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-bounds"></a><h3>goocanvas.Canvas.set_bounds</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_bounds</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bottom</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong>:</span></p></td><td>The left edge.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>top</code></strong>:</span></p></td><td>The top edge.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong>:</span></p></td><td>The right edge.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>bottom</code></strong>:</span></p></td><td>The bottom edge.</td></tr></tbody></table><p>
                Sets the bounds of the
                <code class="classname">goocanvas.Canvas</code>
                in device units. By default, device units are the same as pixels, though
                <code class="methodname">set_scale</code>
                can be used to specify a different scale.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-root-item"></a><h3>goocanvas.Canvas.set_root_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_root_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>The root canvas item.</td></tr></tbody></table><p>
                Sets the root item of the canvas. Any existing canvas items are removed.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-root-item-model"></a><h3>goocanvas.Canvas.set_root_item_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_root_item_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>model</code></strong>:</span></p></td><td>The root canvas item model.</td></tr></tbody></table><p>
                Sets the root item of the canvas. A hierarchy of canvas items will be created,
                corresponding to the hierarchy of items in the model.
                Any current canvas items will be removed.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-scale"></a><h3>goocanvas.Canvas.set_scale</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_scale</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixel_per_unit</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixel_per_unit</code></strong>:</span></p></td><td>The new scale setting.</td></tr></tbody></table><p>
                Sets the current scale of the canvas, i.e. the number of pixels
                to use for each device unit.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-static-root-item"></a><h3>goocanvas.Canvas.set_static_root_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_static_root_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>item</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>item</code></strong>:</span></p></td><td>the static root item.</td></tr></tbody></table><p>
               Sets the static root item. Any existing static items are removed.
            </p></div><div class="refsect2"><a name="method-goocanvas--set-static-root-item-model"></a><h3>goocanvas.Canvas.set_static_root_item_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_static_root_item_model</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>model</code></strong>:</span></p></td><td>the static root item model.</td></tr></tbody></table><p>
               Sets the static root item model. Any existing static items are removed.
            </p></div><div class="refsect2"><a name="method-goocanvas--unregister-item"></a><h3>goocanvas.Canvas.unregister_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unregister_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>model</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>model</code></strong>:</span></p></td><td>The item model whose canvas item is being finalized.</td></tr></tbody></table><p>
                This function should be called in the finalize method of
                <code class="classname">goocanvas.Item</code>
                objects, to remove the canvas item from the GooCanvas's hash table.
            </p></div><div class="refsect2"><a name="method-goocanvas--unregister-widget-item"></a><h3>goocanvas.Canvas.unregister_widget_item</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unregister_widget_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>witem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>witem</code></strong>:</span></p></td><td>A
                        <code class="classname">goocanvas.Widget</code> item.
                    </td></tr></tbody></table><p>
                Unregisters a widget item from the canvas, when the item is no longer in the canvas.
            </p><p>
                This function should only be used by
                <code class="classname">goocanvas.Widget</code>
                and ubclass implementations.
            </p></div><div class="refsect2"><a name="method-goocanvas--update"></a><h3>goocanvas.Canvas.update</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">update</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
                Updates any items that need updating.
                This is only intended to be used by subclasses of
                <code class="classname">goocanvas.Canvas</code> or
                <code class="classname">goocanvas.Item</code>
                implementation.
            </p></div></div><div class="refsect1"><a name="idp46888208569056"></a><h2>Signals</h2><div class="refsect2"><a name="signal-goocanvas--item-created"></a><h3>The "item-created" goocanvas.Canvas Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>canvas</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>model</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>canvas</code></em>:</span></p></td><td>
                        The <code class="classname">goocanvas.Canvas</code>.
                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>item</code></em>:</span></p></td><td>
                        The new <code class="classname">goocanvas.Item</code>.
                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>model</code></em>:</span></p></td><td>
                        The <code class="classname">goocanvas.ItemModel</code>.
                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param</code></em>:</span></p></td><td>the first user parameter (if any) specified
                        with the <a
href="../pygobject/class-gobject.html#method-gobject--connect"
><code class="methodname">connect</code>()</a>
                        method
                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>:</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
                The 'item-created" signal is emitted when the a new canvas item is created.
                Applications can set up signal handlers for the new items here.
            </p></div><div class="refsect2"><a name="signal-goocanvas--set-scroll-adjustments"></a><h3>The "set-scroll-adjustments" goocanvas.Canvas Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>canvas</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>canvas</code></em>:</span></p></td><td>
                            The <code class="classname">goocanvas.Canvas</code>.
                        </td></tr><tr><td><p><span class="term"><em class="parameter"><code>hadjustment</code></em>:</span></p></td><td>
                            The horizontal adjustment.
                        </td></tr><tr><td><p><span class="term"><em class="parameter"><code>vadjustment</code></em>:</span></p></td><td>
                            The vertical adjustment.
                        </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param</code></em>:</span></p></td><td>the first user parameter (if any) specified
                            with the <a
href="../pygobject/class-gobject.html#method-gobject--connect"
><code class="methodname">connect</code>()</a>
                            method
                        </td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>:</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
                The 'set-scroll-adjustments" signal is emitted when the GooCanvas is placed inside a
                <code class="classname">gtk.ScrolledWindow</code>,
                to connect up the adjustments so scrolling works properly.
                It isn't useful for applications.
            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pygoocanvas-core-classes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pygoocanvas-core-classes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-canvas-item.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGooCanvas Core Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> goocanvas.Item</td></tr></table></div></body></html>