/usr/share/gtk-doc/html/pygtk/class-gtkdrawingarea.html is in python-gtk2-doc 2.24.0-3.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.DrawingArea</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkdialog.html" title="gtk.Dialog"><link rel="next" href="class-gtkeditable.html" title="gtk.Editable"></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">gtk.DrawingArea</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkdialog.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkeditable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.DrawingArea"><a name="class-gtkdrawingarea"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.DrawingArea</h2><p>gtk.DrawingArea — a widget for custom user interface elements.</p></div><div class="refsect1" title="Synopsis"><a name="id3671118"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.DrawingArea</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkdrawingarea.html#constructor-gtkdrawingarea" title="Constructor">gtk.DrawingArea</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3671167"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea">gtk.DrawingArea</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3671205"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.DrawingArea Properties"><a name="properties-gtkdrawingarea"></a><h2>gtk.DrawingArea Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p></div><div class="refsect1" title="gtk.DrawingArea Style Properties"><a name="style-properties-gtkdrawingarea"></a><h2>gtk.DrawingArea Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.DrawingArea Signal Prototypes"><a name="signal-prototypes-gtkdrawingarea"></a><h2>gtk.DrawingArea Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p></div><div class="refsect1" title="Description"><a name="id3671314"></a><h2>Description</h2><p>The <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>
widget is used for creating custom user interface elements. It's essentially
a blank widget containing a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> that
you can draw on. The contained <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> is
accessed using the <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> "window"
attribute as:</p><pre class="programlisting">
gdkwindow = drawingarea.window
</pre><p>Since a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
is a subclass of <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>,
all of the <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>
methods are available for drawing on the <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>'s
gdkwindow.</p><p>After creating a drawing area, the application may want to
connect to:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Mouse and button press signals to respond to input from the
user. Use the <a class="link" href="class-gtkwidget.html#method-gtkwidget--add-events" title="gtk.Widget.add_events"><code class="methodname">gtk.Widget.add_events</code>()</a>
method to enable events you wish to receive. To receive keyboard events, you
will need to set the <code class="literal">gtk.CAN_FOCUS</code> flag on the drawing
area</p></li><li class="listitem"><p>The "realize" signal to take any necessary actions when the
widget is instantiated on a particular display.</p></li><li class="listitem"><p>The "configure_event" signal to take any necessary actions
when the widget changes size.</p></li><li class="listitem"><p>The "expose_event" signal to handle redrawing the contents of
the widget when a drawing area first comes on screen, or when it's covered by
another window and then uncovered (exposed). You can also force an expose
event by adding to the "damage region" of the drawing area's window using
the <a class="link" href="class-gtkwidget.html#method-gtkwidget--queue-draw-area" title="gtk.Widget.queue_draw_area"><code class="methodname">gtk.Widget.queue_draw_area</code>()</a>
method.</p></li></ul></div><p>See the <a class="ulink" href="http://www.pygtk.org/pygtk2tutorial/ch-DrawingArea.html" target="_top">Drawing
Area</a> chapter in the tutorial for more information on using a <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>.</p><p>Sometimes a <a class="link" href="class-gtkimage.html" title="gtk.Image"><code class="classname">gtk.Image</code></a> is a useful
alternative to a drawing area. You can put a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> in
the <a class="link" href="class-gtkimage.html" title="gtk.Image"><code class="classname">gtk.Image</code></a>
and draw to the <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>,
calling the <a class="link" href="class-gtkwidget.html#method-gtkwidget--queue-draw" title="gtk.Widget.queue_draw"><code class="methodname">gtk.Widget.queue_draw</code>()</a>
method on the <a class="link" href="class-gtkimage.html" title="gtk.Image"><code class="classname">gtk.Image</code></a> when you
want to refresh to the screen.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkdrawingarea"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.DrawingArea</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new drawingarea widget</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>
widget.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkdialog.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkeditable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Dialog </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Editable</td></tr></table></div></body></html>
|