/usr/share/gtk-doc/html/pygoocanvas/class-canvas-item.html is in python-pygoocanvas 0.14.1-1ubuntu8.
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 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>goocanvas.Item</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.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="class-canvas.html" title="goocanvas.Canvas"><link rel="next" href="class-canvas-item-simple.html" title="goocanvas.ItemSimple"></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.Item</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-canvas.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-simple.html">Next</a></td></tr></table><hr></div><div class="refentry" title="goocanvas.Item"><a name="class-canvas-item"></a><div class="titlepage"></div><div class="refnamediv"><h2>goocanvas.Item</h2><p>goocanvas.Item — The interface for canvas items.</p></div><div class="refsect1" title="Synopsis"><a name="idp553952"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">goocanvas.Item</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis"> def <span class="methodname">add_child</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>position</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">allocate_area</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>requested_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocated_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_offset</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">animate</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>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>absolute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>duration</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>step_time</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">ensure_updated</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">find_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</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_canvas</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_num</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_child_properties</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>properties</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_child_property</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</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>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent_is_visible</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_model</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_n_children</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_parent</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_requested_area</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_requested_height</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>width</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_style</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_simple_tranform</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_transform</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">get_transform_for_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">is_container</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">is_visible</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">lower</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>below</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">move_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>old_position</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>new_position</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">paint</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">raise_</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>above</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">remove</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">remove_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_num</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">request_update</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_num</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">rotate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">scale</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>sy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_canvas</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canvas</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_child_properties</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>properties</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_child_property</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_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_parent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_simple_transform</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>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rotation</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_style</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">set_transform</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>matrix</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">skew_x</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">skew_y</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">stop_animation</span><span class="methodname"></span>()</code><br><code class="methodsynopsis"> def <span class="methodname">translate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ty</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname">update</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>entire_tree</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="idp3506464"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a
href="../pygobject/class-gobjectginterface.html"
>gobject.GInterface</a>
+-- goocanvas.Item
</pre></div><div class="refsect1" title="goocanvas.Item Properties"><a name="properties-goocanvasitem"></a><h2>goocanvas.Item Properties</h2><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">"can-focus"</td><td valign="top">Read/Write</td><td valign="top">If the item can take the keyboard focus.
Default value: <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"description"</td><td valign="top">Read/Write</td><td valign="top">A description of the item for use by assistive technologies.
Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"parent"</td><td valign="top">Read/Write</td><td valign="top">The parent item.</td></tr><tr valign="top"><td valign="top">"pointer-events"</td><td valign="top">Read/Write</td><td valign="top">Specifies when the item receives pointer events. Default value:
goocanvas.EVENTS_VISIBLE_MASK|goocanvas.EVENTS_PAINTED_MASK|
goocanvas.EVENTS_FILL_MASK|goocanvas.EVENTS_STROKE_MASK.</td></tr><tr valign="top"><td valign="top">"title"</td><td valign="top">Read/Write</td><td valign="top">A short context-rich description of the item for use by
assistive technologies. Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"tooltip"</td><td valign="top">Read/Write</td><td valign="top">The tooltip to display for the item. Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"transform"</td><td valign="top">Read/Write</td><td valign="top">The transformation matrix of the item.</td></tr><tr valign="top"><td valign="top">"visibility"</td><td valign="top">Read/Write</td><td valign="top">When the canvas item is visible. Default value: goocanvas.ITEM_VISIBLE.</td></tr><tr valign="top"><td valign="top">"visibility-threshold"</td><td valign="top">Read/Write</td><td valign="top">The scale threshold at which the item becomes visible.
Allowed values: >= 0 Default value: 0.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="goocanvas.Item Signal Prototypes"><a name="signal-prototypes-goocanvasitem"></a><h2>goocanvas.Item Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"animation-finished"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>stopped</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">"button-press-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"button-release-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"child-notify"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>pspec</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">"enter-notify-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"focus-in-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"focus-out-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"grab-broken-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"key-press-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"key-release-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"leave-notify-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"motion-notify-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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">"query-tooltip"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>x</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>y</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>keyboard_mode</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tooltip</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">"scroll-event"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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" title="Known Implementation"><a name="idp3619568"></a><h2>Known Implementation</h2><p>
<code class="classname">goocanvas.Item</code>
is implementated by
<code class="classname">goocanvas.Rect</code>,
<code class="classname">goocanvas.Ellipse</code>,
<code class="classname">goocanvas.Path</code>,
<code class="classname">goocanvas.Polyline</code>,
<code class="classname">goocanvas.Text</code>,
<code class="classname">goocanvas.Image</code>,
<code class="classname">goocanvas.Group</code>,
<code class="classname">goocanvas.Widget</code>,
<code class="classname">goocanvas.Table</code>,
<code class="classname">goocanvas.ItemSimple</code>
</p></div><div class="refsect1" title="Description"><a name="idp3630288"></a><h2>Description</h2><code class="classname">goocanvas.Item</code>
defines the interface that canvas items must implement, and contains methods for operating on canvas items.
</div><div class="refsect1" title="Methods"><a name="idp3632144"></a><h2>Methods</h2><div class="refsect2" title="goocanvas.Item.add_child"><a name="method-goocanvasitem--add-child"></a><h3>goocanvas.Item.add_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_child</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>position</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 add.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>position</code></strong>:</span></p></td><td>the position of the item, or -1 to place it
last (at the top of the stacking order).</td></tr></tbody></table><p>
Adds a child item to a container item at the given stack position.
</p></div><div class="refsect2" title="goocanvas.Item.allocate_area"><a name="method-goocanvasitem--allocate-area"></a><h3>goocanvas.Item.allocate_area</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">allocate_area</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>requested_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocated_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_offset</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>requested_area</code></strong>:</span></p></td><td>The area that the item originally requested, in the parent's coordinate space.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>allocated_area</code></strong>:</span></p></td><td>The area that the item has been allocated, in the parent's coordinate space.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x_offset</code></strong>:</span></p></td><td>The x offset of the allocated area from the requested area in
the device coordinate space.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y_offset</code></strong>:</span></p></td><td>The y offset of the allocated area from the requested area in
the device coordinate space.</td></tr></tbody></table><p>
This is used by <code class="classname">goocanvas.Table</code>
and other layout items to allocate an area to each of their children.
</p><p>
Note that the parent item will use a transform to move each of its children for the layout,
so their is no need for the item to reposition itself. It only needs to recalculate its device bounds.
</p><p>
The x_offset and y_offset are provided since for the simple builtin items all they need
to do is add these to their bounds.
</p></div><div class="refsect2" title="goocanvas.Item.animate"><a name="method-goocanvasitem--animate"></a><h3>goocanvas.Item.animate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">animate</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>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>absolute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>duration</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>step_time</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</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 final x offset from the current position.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>the final y offset from the current position.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>scale</code></strong>:</span></p></td><td>the final scale of the item.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>degrees</code></strong>:</span></p></td><td>the final rotation of the item.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>absolute</code></strong>:</span></p></td><td>if the x, y, scale and degrees values are absolute, or relative to the
current transform. Note that absolute animations only work if the item currently has a simple transform.
If the item has a shear or some other complicated transform it may result in strange animations.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>duration</code></strong>:</span></p></td><td>the duration of the animation, in milliseconds
(1/1000ths of a second).</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>step_time</code></strong>:</span></p></td><td>the time between each animation step, in milliseconds.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong>:</span></p></td><td>specifies what happens when the animation finishes.</td></tr></tbody></table><p>
Animates an item from its current position to the given offsets, scale and rotation.
</p></div><div class="refsect2" title="goocanvas.Item.ensure_updated"><a name="method-goocanvasitem--ensure-updated"></a><h3>goocanvas.Item.ensure_updated</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ensure_updated</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
Updates the canvas immediately, if an update is scheduled. This ensures that all item bounds are up-to-date.
</p></div><div class="refsect2" title="goocanvas.Item.find_child"><a name="method-goocanvasitem--find-child"></a><h3>goocanvas.Item.find_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">find_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</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>child</code></strong>:</span></p></td><td>the child item to find.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The position of the given child item, or -1 if it isn't found.</td></tr></tbody></table><p>
Attempts to find the given child item with the container's stack.
</p></div><div class="refsect2" title="goocanvas.Item.get_bounds"><a name="method-goocanvasitem--get-bounds"></a><h3>goocanvas.Item.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 <code class="classname">goocanvas.Bounds</code>
holding the four coordinates.</td></tr></tbody></table><p>
Gets the bounds of the item.
Note that the bounds includes the entire fill and stroke extents of the item,
whether they are painted or not.
</p></div><div class="refsect2" title="goocanvas.Item.get_canvas"><a name="method-goocanvasitem--get-canvas"></a><h3>goocanvas.Item.get_canvas</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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>The
<code class="classname">goocanvas.Canvas</code></td></tr></tbody></table><p>
Returns the <code class="classname">goocanvas.Canvas</code>
</p></div><div class="refsect2" title="goocanvas.Item.get_child"><a name="method-goocanvasitem--get-child"></a><h3>goocanvas.Item.get_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_num</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>child_num</code></strong>:</span></p></td><td>the position of a child in the container's stack.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The child item at the given stack position.</td></tr></tbody></table><p>
Gets the child item at the given stack position.
</p></div><div class="refsect2" title="goocanvas.Item.get_child_properties"><a name="method-goocanvasitem--get-child-properties"></a><h3>goocanvas.Item.get_child_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_properties</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>properties</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>child</code></strong>:</span></p></td><td>a child
<code class="classname">goocanvas.Item</code>
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>properties</code></strong>:</span></p></td><td>property names as string</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A tuple containing the property values.</td></tr></tbody></table><p>
Gets the values of one or more child properties of child.
</p></div><div class="refsect2" title="goocanvas.Item.get_child_property"><a name="method-goocanvasitem--get-child-property"></a><h3>goocanvas.Item.get_child_property</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child_property</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</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>child</code></strong>:</span></p></td><td>a child
<code class="classname">goocanvas.Item</code>
</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>property</code></strong>:</span></p></td><td>property name as string</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The property value.</td></tr></tbody></table><p>
Gets a child property of child.
</p></div><div class="refsect2" title="goocanvas.Item.get_items_at"><a name="method-goocanvasitem--get-items-at"></a><h3>goocanvas.Item.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>cr</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_pointer_event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent_is_visible</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>cr</code></strong>:</span></p></td><td>A cairo context.</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" properties of items should be used
to determine which parts of the item are tested.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>parent_is_visible</code></strong>:</span></p></td><td>True if the parent item is visible (which implies that all ancestors
are also visible).</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, or None if no
item was found.</td></tr></tbody></table><p>
Gets the items at the given point.
</p></div><div class="refsect2" title="goocanvas.Item.get_model"><a name="method-goocanvasitem--get-model"></a><h3>goocanvas.Item.get_model</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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 canvas model, or None of
the item isn't in a model.</td></tr></tbody></table><p>
Gets the model of the canvas item.
</p></div><div class="refsect2" title="goocanvas.Item.get_n_children"><a name="method-goocanvasitem--get-n-children"></a><h3>goocanvas.Item.get_n_children</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_n_children</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 number of children.</td></tr></tbody></table><p>
Gets the number of children of the container.
</p></div><div class="refsect2" title="goocanvas.Item.get_parent"><a name="method-goocanvasitem--get-parent"></a><h3>goocanvas.Item.get_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parent</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 parent item, or None if the
item has no parent.</td></tr></tbody></table><p>
Gets the parent of the given item.
</p></div><div class="refsect2" title="goocanvas.Item.get_requested_area"><a name="method-goocanvasitem--get-requested-area"></a><h3>goocanvas.Item.get_requested_area</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_requested_area</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</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"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A <code class="classname">goocanvas.Bounds
</code> containing the requested area.</td></tr></tbody></table><p>
This function is only intended to be used when implementing new canvas items, specifically layout items such as
<code class="classname">goocanvas.Table</code>.
It gets the requested area of a child item.
</p></div><div class="refsect2" title="goocanvas.Item.get_requested_height"><a name="method-goocanvasitem--get-requested-height"></a><h3>goocanvas.Item.get_requested_height</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_requested_height</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>width</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>width</code></strong>:</span></p></td><td>The width that the item may be allocated.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The requested height of the item, given the allocated width,
or -1 if the item doesn't support this method or its height doesn't change when
allocated different widths.</td></tr></tbody></table><p>
This function is only intended to be used when implementing new canvas items,
specifically layout items such as
<code class="classname">goocanvas.Table</code>.
</p><p>
It gets the requested height of a child item, assuming it is allocated the given width.
This is useful for text items whose requested height may change depending on the allocated width.
</p></div><div class="refsect2" title="goocanvas.Item.get_style"><a name="method-goocanvasitem--get-style"></a><h3>goocanvas.Item.get_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_style</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 item's style.</td></tr></tbody></table><p>
Gets the item's style. If the item doesn't have its own style it will return its parent's style.
</p></div><div class="refsect2" title="goocanvas.Item.get_simple_transform"><a name="method-goocanvasitem--get-simple-transform"></a><h3>goocanvas.Item.get_simple_transform</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_simple_transform</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 4 item tuple containing the item's x, y, scale and rotation.</td></tr></tbody></table><p>
This function can be used to get the position, scale and rotation of an item, providing that
the item has a simple transformation matrix (e.g. set with
<code class="methodname">goocanvas.Item.set_simple_transform</code>(),
or using a combination of simple translate, scale and rotate operations).
If the item has a complex transformation matrix the results will be incorrect.
</p></div><div class="refsect2" title="goocanvas.Item.get_transform"><a name="method-goocanvasitem--get-transform"></a><h3>goocanvas.Item.get_transform</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_transform</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 item's transformation matrix.</td></tr></tbody></table><p>
Gets the transformation matrix of an item.
</p></div><div class="refsect2" title="goocanvas.Item.get_transform_for_child"><a name="method-goocanvasitem--get-transform-for-child"></a><h3>goocanvas.Item.get_transform_for_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_transform_for_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</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>child</code></strong>:</span></p></td><td>A child of item.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>The transformation matrix or None</td></tr></tbody></table><p>
Gets the transformation matrix of an item combined with any special transform needed for the given child.
These special transforms are used by layout items such as
<code class="classname">goocanvas.Table</code>.
</p></div><div class="refsect2" title="goocanvas.Item.is_container"><a name="method-goocanvasitem--is-container"></a><h3>goocanvas.Item.is_container</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_container</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>True if the item is a container.</td></tr></tbody></table><p>
Tests to see if the given item is a container.
</p></div><div class="refsect2" title="goocanvas.Item.is_visible"><a name="method-goocanvasitem--is-visible"></a><h3>goocanvas.Item.is_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_visible</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>True if the item is visible.</td></tr></tbody></table><p>
Tests to see if the given item is visible.
</p><p>
This entails checking the item's own visibility setting, as well as those of its ancestors.
</p><p>
Note that the item may be scrolled off the screen and so may not be actually visible to the user.
</p></div><div class="refsect2" title="goocanvas.Item.lower"><a name="method-goocanvasitem--lower"></a><h3>goocanvas.Item.lower</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">lower</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>below</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>below</code></strong>:</span></p></td><td>the item to lower item below,
or None to lower item to the bottom of the stack.</td></tr></tbody></table><p>
Lowers an item in the stacking order.
</p></div><div class="refsect2" title="goocanvas.Item.move_child"><a name="method-goocanvasitem--move-child"></a><h3>goocanvas.Item.move_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">move_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>old_position</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>new_position</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>old_position</code></strong>:</span></p></td><td>the current position of the child item.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>new_position</code></strong>:</span></p></td><td>the new position of the child item.</td></tr></tbody></table><p>
Moves a child item to a new stack position within the container.
</p></div><div class="refsect2" title="goocanvas.Item.paint"><a name="method-goocanvasitem--paint"></a><h3>goocanvas.Item.paint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">paint</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 bounds that need to be repainted.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>scale</code></strong>:</span></p></td><td>the scale to use to determine whether an item should be painted.
See visibility-thresold</td></tr></tbody></table><p>
Moves a child item to a new stack position within the container.
</p></div><div class="refsect2" title="goocanvas.Item.raise_"><a name="method-goocanvasitem--raise-"></a><h3>goocanvas.Item.raise_</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">raise_</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>above</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>above</code></strong>:</span></p></td><td>the item to raise item above, or
NULL to raise item to the top of the stack.</td></tr></tbody></table><p>
Raises an item in the stacking order.
</p></div><div class="refsect2" title="goocanvas.Item.remove"><a name="method-goocanvasitem--remove"></a><h3>goocanvas.Item.remove</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
Removes an item from its parent. If the item is in a canvas it will be removed.
</p><p>
This would normally also result in the item being freed.
</p></div><div class="refsect2" title="goocanvas.Item.remove_child"><a name="method-goocanvasitem--remove-child"></a><h3>goocanvas.Item.remove_child</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_num</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>child_num</code></strong>:</span></p></td><td>the position of the child item to remove.</td></tr></tbody></table><p>
Removes the child item at the given position.
</p></div><div class="refsect2" title="goocanvas.Item.request_update"><a name="method-goocanvasitem--request-update"></a><h3>goocanvas.Item.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>
Requests that an update of the item is scheduled. It will be performed
as soon as the application is idle, and before the canvas is redrawn.
</p></div><div class="refsect2" title="goocanvas.Item.rotate"><a name="method-goocanvasitem--rotate"></a><h3>goocanvas.Item.rotate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">rotate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</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>degrees</code></strong>:</span></p></td><td>the clockwise angle of rotation.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cx</code></strong>:</span></p></td><td>the x coordinate of the origin of the rotation.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cy</code></strong>:</span></p></td><td>the y coordinate of the origin of the rotation.</td></tr></tbody></table><p>
Rotates the item's coordinate system by the given amount, about the given origin.
</p></div><div class="refsect2" title="goocanvas.Item.scale"><a name="method-goocanvasitem--scale"></a><h3>goocanvas.Item.scale</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">scale</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>sy</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>sx</code></strong>:</span></p></td><td>the amount to scale the horizontal axis.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>sy</code></strong>:</span></p></td><td>the amount to scale the vertical axis.</td></tr></tbody></table><p>
Scales the item's coordinate system by the given amounts.
</p></div><div class="refsect2" title="goocanvas.Item.set_canvas"><a name="method-goocanvasitem--set-canvas"></a><h3>goocanvas.Item.set_canvas</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_canvas</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canvas</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>canvas</code></strong>:</span></p></td><td>A goocanvas.Canvas</td></tr></tbody></table><p>
Sets the canvas of the item.
</p><p>
This is only needed for setting the canvas of the root item, as the other items can
get the canvas from their parents.
</p></div><div class="refsect2" title="goocanvas.Item.set_child_properties"><a name="method-goocanvasitem--set-child-properties"></a><h3>goocanvas.Item.set_child_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_child_properties</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>properties</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>child</code></strong>:</span></p></td><td>A child goocanvas.Item</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>properties</code></strong>:</span></p></td><td>The properties to set as **kwargs</td></tr></tbody></table><p>
Sets the values of one or more child properties of child.
</p></div><div class="refsect2" title="goocanvas.Item.set_child_property"><a name="method-goocanvasitem--set-child-property"></a><h3>goocanvas.Item.set_child_property</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_child_property</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</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>child</code></strong>:</span></p></td><td>A child goocanvas.Item</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>property</code></strong>:</span></p></td><td>The property to set as string</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>varlistentry</code></strong>:</span></p></td><td>The value to set for the property.</td></tr></tbody></table><p>
Sets a child property of <em class="parameter"><code>child</code></em>.
</p></div><div class="refsect2" title="goocanvas.Item.set_model"><a name="method-goocanvasitem--set-model"></a><h3>goocanvas.Item.set_model</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_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>A goocanvas.ItemModel</td></tr></tbody></table><p>
Sets the model of the given canvas item.
</p></div><div class="refsect2" title="goocanvas.Item.set_parent"><a name="method-goocanvasitem--set-parent"></a><h3>goocanvas.Item.set_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_parent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</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>parent</code></strong>:</span></p></td><td>the new parent item.</td></tr></tbody></table><p>
This method is only intended to be used when implementing new canvas items
(specifically container items such as
goocanvas.Group).
It sets the parent of the child item.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
This method cannot be used to add an item to a group or to change
the parent of an item. To do that use the "parent" property.
</div></div><div class="refsect2" title="goocanvas.Item.set_simple_transform"><a name="method-goocanvasitem--set-simple-transform"></a><h3>goocanvas.Item.set_simple_transform</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_simple_transform</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>scale</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rotation</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 origin of the item's coordinate space.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong>:</span></p></td><td>The x coordinate of the origin of the item's coordinate space.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>scale</code></strong>:</span></p></td><td>The scale of the item.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rotation</code></strong>:</span></p></td><td>The clockwise rotation of the item, in degrees.</td></tr></tbody></table><p>
A convenience function to set the item's transformation matrix.
</p></div><div class="refsect2" title="goocanvas.Item.set_style"><a name="method-goocanvasitem--set-style"></a><h3>goocanvas.Item.set_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_style</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</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>style</code></strong>:</span></p></td><td>A goocanvas.Style</td></tr></tbody></table><p>
Sets the item's style, by copying the properties from the given style.
</p></div><div class="refsect2" title="goocanvas.Item.set_transform"><a name="method-goocanvasitem--set-transform"></a><h3>goocanvas.Item.set_transform</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_transform</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>matrix</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>matrix</code></strong>:</span></p></td><td>the new transformation matrix, or None to reset
the transformation to the identity matrix.</td></tr></tbody></table><p>
Sets the transformation matrix of an item.
</p></div><div class="refsect2" title="goocanvas.Item.skew_x"><a name="method-goocanvasitem--skew-x"></a><h3>goocanvas.Item.skew_x</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skew_x</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</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>degrees</code></strong>:</span></p></td><td>the skew angle.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cx</code></strong>:</span></p></td><td>the x coordinate of the origin of the skew transform.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cy</code></strong>:</span></p></td><td>the y coordinate of the origin of the skew transform.</td></tr></tbody></table><p>
Skews the item's coordinate system along the x axis by the given amount, about the given origin.
</p></div><div class="refsect2" title="goocanvas.Item.skew_y"><a name="method-goocanvasitem--skew-y"></a><h3>goocanvas.Item.skew_y</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">skew_y</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>degrees</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cy</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>degrees</code></strong>:</span></p></td><td>the skew angle.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cx</code></strong>:</span></p></td><td>the x coordinate of the origin of the skew transform.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cy</code></strong>:</span></p></td><td>the y coordinate of the origin of the skew transform.</td></tr></tbody></table><p>
Skews the item's coordinate system along the y axis by the given amount, about the given origin.
</p></div><div class="refsect2" title="goocanvas.Item.stop_animation"><a name="method-goocanvasitem--stop-animation"></a><h3>goocanvas.Item.stop_animation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stop_animation</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
Stops any current animation for the given item, leaving it at its current position.
</p></div><div class="refsect2" title="goocanvas.Item.translate"><a name="method-goocanvasitem--translate"></a><h3>goocanvas.Item.translate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">translate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ty</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>tx</code></strong>:</span></p></td><td>the amount to move the origin in the horizontal direction.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ty</code></strong>:</span></p></td><td>the amount to move the origin in the vertical direction.</td></tr></tbody></table><p>
Translates the origin of the item's coordinate system by the given amounts.
</p></div><div class="refsect2" title="goocanvas.Item.update"><a name="method-goocanvasitem--update"></a><h3>goocanvas.Item.update</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">update</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>entire_tree</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cr</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>entire_tree</code></strong>:</span></p></td><td>If the entire subtree should be updated.</td></tr><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"><span class="emphasis"><em>Returns</em></span>:</span></p></td><td>A <code class="classname">goocanvas.Bounds
</code> containing the requested area.</td></tr></tbody></table><p>
This function is only intended to be used when implementing new canvas items, specifically layout items such as
<code class="classname">goocanvas.Group</code>.
Updates the item, if needed, and any children, returning the bounding box.
</p></div></div><div class="refsect1" title="Signals"><a name="idp4047936"></a><h2>Signals</h2><div class="refsect2" title='The "animation-finished" goocanvas.Item Signal'><a name="signal-goocanvasitem--animation-finished"></a><h3>The "animation-finished" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>stopped</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>stopped</code></em>:</span></p></td><td>
if the animation was explicitly stopped.
</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 "animation-finished" signal is emitted when the item animation has finished.
</p></div><div class="refsect2" title='The "button-press-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--button-press-event"></a><h3>The "button-press-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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 "button-press-event" signal is emitted when a mouse button is pressed in an item.
</p></div><div class="refsect2" title='The "button-release-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--button-release-event"></a><h3>The "button-release-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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 "button-release-event" signal is emitted when a mouse button is released in an item.
</p></div><div class="refsect2" title='The "child-notify" goocanvas.Item Signal'><a name="signal-goocanvasitem--child-notify"></a><h3>The "child-notify" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>pspec</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>pspec</code></em>:</span></p></td><td>The GParamSpec of the changed child property.</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 "child-notify" signal is emitted for each child property that has changed.
The signal's detail holds the property name.
</p></div><div class="refsect2" title='The "enter-notify-events" goocanvas.Item Signal'><a name="signal-goocanvasitem--enter-notify-event"></a><h3>The "enter-notify-events" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "enter-notify-event" signal is emitted when the mouse enters an item.
</p></div><div class="refsect2" title='The "focus-in-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--focus-in-event"></a><h3>The "focus-in-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data, with coordinates translated to canvas coordinates.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "focus-in-event" signal is emitted when the item receives the keyboard focus.
</p></div><div class="refsect2" title='The "focus-out-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--focus-out-event"></a><h3>The "focus-out-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data, with coordinates translated to canvas coordinates.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "focus-out-event" signal is emitted when the item loses the keyboard focus.
</p></div><div class="refsect2" title='The "grab-broken-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--grab-broken-event"></a><h3>The "grab-broken-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data, with coordinates translated to canvas coordinates.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "grab-broken-event" signal is emitted when the item's keyboard or pointer grab was lost unexpectedly.
</p></div><div class="refsect2" title='The "key-press-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--key-press-event"></a><h3>The "key-press-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data, with coordinates translated to canvas coordinates.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "key-press-event" signal is emitted when a key is pressed and the item has the keyboard focus.
</p></div><div class="refsect2" title='The "key-release-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--key-release-event"></a><h3>The "key-release-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data, with coordinates translated to canvas coordinates.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "key-release-event" signal is emitted when a key is released and the item has the keyboard focus.
</p></div><div class="refsect2" title='The "leave-notify-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--leave-notify-event"></a><h3>The "leave-notify-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "leave-notify-event" signal is emitted when the mouse leaves an item.
</p></div><div class="refsect2" title='The "motion-notify-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--motion-notify-event"></a><h3>The "motion-notify-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "motion-notify-event" signal is emitted when the mouse moves within an item.
</p></div><div class="refsect2" title='The "query-tooltip" goocanvas.Item Signal'><a name="signal-goocanvasitem--query-tooltip"></a><h3>The "query-tooltip" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>x</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>y</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>keyboard_mode</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tooltip</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x</code></em>:</span></p></td><td>
the x coordinate of the mouse.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y</code></em>:</span></p></td><td>
the y coordinate of the mouse.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>keyboard_mode</code></em>:</span></p></td><td>
<code class="literal">True</code> if the tooltip was triggered using the keyboard.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tooltip</code></em>:</span></p></td><td>
a <code class="classname">gtk.Tooltip</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "query-tooltip" signal is emitted when the mouse has paused over the
item for a certain amount of time, or the tooltip was requested via the keyboard.
</p><p>
Note that if keyboard_mode is <code class="literal">True</code>, the values of
x and y are undefined and should not be used.
</p><p>
If the item wants to display a tooltip it should update tooltip and return <code class="literal">True</code>.
</p></div><div class="refsect2" title='The "scroll-event" goocanvas.Item Signal'><a name="signal-goocanvasitem--scroll-event"></a><h3>The "scroll-event" goocanvas.Item Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</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>target_item</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</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>item</code></em>:</span></p></td><td>
The <code class="classname">goocanvas.Item</code>
that received the signal.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_item</code></em>:</span></p></td><td>
The target of the event.
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em>:</span></p></td><td>
The event data. The x and y fields contain the mouse position in the
item's coordinate space. The root_x and root_y fields contain the same
coordinates converted to the canvas coordinate space.
</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><tr><td><p><span class="term"><em class="parameter"><code>Returns</code></em>:</span></p></td><td>True to stop the signal emission, or False to let it continue.</td></tr></tbody></table><p>
The "scroll-event" signal is emitted when a button in the 4 to 7 range is pressed.
Wheel mice are usually configured to generate button press events for buttons
4 and 5 when the wheel is turned in an item.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-canvas.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-simple.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">goocanvas.Canvas </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> goocanvas.ItemSimple</td></tr></table></div></body></html>
|