~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gtklayout.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-07 11:08:47 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107110847-f5av7e1ttudh7ra6
Tags: 2.17.0-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Layout</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtklabel.html" title="gtk.Label"><link rel="next" href="class-gtklinkbutton.html" title="gtk.LinkButton"></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.Layout</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtklabel.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtklinkbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtklayout"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Layout</h2><p>gtk.Layout — infinite scrollable area containing child widgets and custom
2
 
drawing</p></div><div class="refsect1" lang="en"><a name="id3567663"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Layout</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
3
 
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtklayout.html#constructor-gtklayout" title="Constructor">gtk.Layout</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hadjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>vadjustment</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--put" title="gtk.Layout.put">put</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--move" title="gtk.Layout.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-size" title="gtk.Layout.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-size" title="gtk.Layout.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-hadjustment" title="gtk.Layout.get_hadjustment">get_hadjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-vadjustment" title="gtk.Layout.get_vadjustment">get_vadjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-hadjustment" title="gtk.Layout.set_hadjustment">set_hadjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-vadjustment" title="gtk.Layout.set_vadjustment">set_vadjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-bin-window" title="gtk.Layout.get_bin_window">get_bin_window</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3568026"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Layout</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><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-gtklabel.html" title="gtk.Label"><link rel="next" href="class-gtklinkbutton.html" title="gtk.LinkButton"></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.Layout</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtklabel.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtklinkbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Layout"><a name="class-gtklayout"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Layout</h2><p>gtk.Layout — infinite scrollable area containing child widgets and custom
 
2
drawing</p></div><div class="refsect1" title="Synopsis"><a name="id3877534"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Layout</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
 
3
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtklayout.html#constructor-gtklayout" title="Constructor">gtk.Layout</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hadjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>vadjustment</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--put" title="gtk.Layout.put">put</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--move" title="gtk.Layout.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-size" title="gtk.Layout.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-size" title="gtk.Layout.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-hadjustment" title="gtk.Layout.get_hadjustment">get_hadjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-vadjustment" title="gtk.Layout.get_vadjustment">get_vadjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-hadjustment" title="gtk.Layout.set_hadjustment">set_hadjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--set-vadjustment" title="gtk.Layout.set_vadjustment">set_vadjustment</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtklayout.html#method-gtklayout--get-bin-window" title="gtk.Layout.get_bin_window">get_bin_window</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3877897"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4
4
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
5
5
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
6
6
      +-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
7
7
        +-- <a class="link" href="class-gtklayout.html" title="gtk.Layout">gtk.Layout</a>
8
 
</pre></div><div class="refsect1" lang="en"><a name="id3568071"></a><h2>Implemented Interfaces</h2><p>
 
8
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3877941"></a><h2>Implemented Interfaces</h2><p>
9
9
                        <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a>
10
10
                        implements 
11
11
                        <a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
12
 
                </p></div><div class="refsect1" lang="en"><a name="properties-gtklayout"></a><h2>gtk.Layout 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><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"hadjustment"</td><td valign="top">Read-Write</td><td valign="top">The <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
 
12
                </p></div><div class="refsect1" title="gtk.Layout Properties"><a name="properties-gtklayout"></a><h2>gtk.Layout 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><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"hadjustment"</td><td valign="top">Read-Write</td><td valign="top">The <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
13
13
for the horizontal position.</td></tr><tr valign="top"><td valign="top">"height"</td><td valign="top">Read-Write</td><td valign="top">the layout height</td></tr><tr valign="top"><td valign="top">"vadjustment"</td><td valign="top">Read-Write</td><td valign="top">The <a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
14
 
for the vertical position.</td></tr><tr valign="top"><td valign="top">"width"</td><td valign="top">Read-Write</td><td valign="top">the layout width</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtklayout"></a><h2>gtk.Layout 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" lang="en"><a name="child-properties-gtklayout"></a><h2>gtk.Layout Child 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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"x"</td><td valign="top">Read-Write</td><td valign="top">the X position of the child</td></tr><tr valign="top"><td valign="top">"y"</td><td valign="top">Read-Write</td><td valign="top">the Y position of the child</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3568371"></a><h2>Attributes</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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"bin_window"</td><td valign="top">Read</td><td valign="top">the window of a layout to draw into</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtklayout"></a><h2>gtk.Layout 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><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtklayout.html#signal-gtklayout--set-scroll-adjustments" title='The "set-scroll-adjustments" gtk.Layout Signal'>set-scroll-adjustments</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>layout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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" lang="en"><a name="id3568581"></a><h2>Description</h2><p>The <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a> is a
 
14
for the vertical position.</td></tr><tr valign="top"><td valign="top">"width"</td><td valign="top">Read-Write</td><td valign="top">the layout width</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Layout Style Properties"><a name="style-properties-gtklayout"></a><h2>gtk.Layout 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.Layout Child Properties"><a name="child-properties-gtklayout"></a><h2>gtk.Layout Child 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="4in"></colgroup><tbody><tr valign="top"><td valign="top">"x"</td><td valign="top">Read-Write</td><td valign="top">the X position of the child</td></tr><tr valign="top"><td valign="top">"y"</td><td valign="top">Read-Write</td><td valign="top">the Y position of the child</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Attributes"><a name="id3878242"></a><h2>Attributes</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="4in"></colgroup><tbody><tr valign="top"><td valign="top">"bin_window"</td><td valign="top">Read</td><td valign="top">the window of a layout to draw into</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Layout Signal Prototypes"><a name="signal-prototypes-gtklayout"></a><h2>gtk.Layout 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><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtklayout.html#signal-gtklayout--set-scroll-adjustments" title='The "set-scroll-adjustments" gtk.Layout Signal'>set-scroll-adjustments</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>layout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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="Description"><a name="id3878451"></a><h2>Description</h2><p>The <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a> is a
15
15
simple container widget similar to the <a class="link" href="class-gtkfixed.html" title="gtk.Fixed"><code class="classname">gtk.Fixed</code></a> container
16
16
widget. Like the <a class="link" href="class-gtkfixed.html" title="gtk.Fixed"><code class="classname">gtk.Fixed</code></a> the <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a> places a
17
17
child widget at a specific position within the container. The <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a> offers
18
18
two features beyond the <a class="link" href="class-gtkfixed.html" title="gtk.Fixed"><code class="classname">gtk.Fixed</code></a>
19
 
widget:</p><div class="itemizedlist"><ul type="disc"><li>a very large width and height for the container - limited
20
 
by the size of an unsigned integer.</li><li>horizontal and vertical adjustments can be specified for
 
19
widget:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">a very large width and height for the container - limited
 
20
by the size of an unsigned integer.</li><li class="listitem">horizontal and vertical adjustments can be specified for
21
21
use with scrollbars, etc.</li></ul></div><p>The <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a> can also
22
22
be drawn on similar to drawing on a <a class="link" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><code class="classname">gtk.DrawingArea</code></a>. 
23
23
When handling expose events on a <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a>, you must
24
24
draw to the window specified by the <code class="literal">bin_window</code> attribute
25
 
rather than the widget <code class="literal">window</code> attribute.</p></div><div class="refsect1" lang="en"><a name="constructor-gtklayout"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.Layout</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hadjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>vadjustment</code></strong></span><span class="initializer">=None</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>hadjustment</code></strong> :</span></p></td><td>horizontal adjustment, or
 
25
rather than the widget <code class="literal">window</code> attribute.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtklayout"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.Layout</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hadjustment</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>vadjustment</code></strong></span><span class="initializer">=None</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>hadjustment</code></strong> :</span></p></td><td>horizontal adjustment, or
26
26
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>vadjustment</code></strong> :</span></p></td><td>vertical adjustment, or
27
27
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a></td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtklayout.html" title="gtk.Layout"><code class="classname">gtk.Layout</code></a>. Usually
28
28
the <em class="parameter"><code>hadjustment</code></em> and
29
29
<em class="parameter"><code>vadjustment</code></em> arguments are not specified or are
30
30
specified as <code class="literal">None</code>, so that new adjustments are
31
 
created.</p></div><div class="refsect1" lang="en"><a name="id3568858"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtklayout--put"></a><h3>gtk.Layout.put</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_widget</code></strong> :</span></p></td><td>the child widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X position of child
 
31
created.</p></div><div class="refsect1" title="Methods"><a name="id3878729"></a><h2>Methods</h2><div class="refsect2" title="gtk.Layout.put"><a name="method-gtklayout--put"></a><h3>gtk.Layout.put</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_widget</code></strong> :</span></p></td><td>the child widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X position of child
32
32
widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y position of child
33
33
widget</td></tr></tbody></table><p>The <code class="methodname">put</code>() method adds
34
34
<em class="parameter"><code>child_widget</code></em> to the layout and places its upper, left
35
35
corner at the position specified by <em class="parameter"><code>x</code></em> and
36
 
<em class="parameter"><code>y</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--move"></a><h3>gtk.Layout.move</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">move</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_widget</code></strong> :</span></p></td><td>a current child of the
 
36
<em class="parameter"><code>y</code></em>.</p></div><div class="refsect2" title="gtk.Layout.move"><a name="method-gtklayout--move"></a><h3>gtk.Layout.move</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">move</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_widget</code></strong> :</span></p></td><td>a current child of the
37
37
layout</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X position to move
38
38
<em class="parameter"><code>child_widget</code></em> to</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y position to move
39
39
<em class="parameter"><code>child_widget</code></em> to</td></tr></tbody></table><p>The <code class="methodname">move</code>() method moves a current child
40
40
of the layout (specified by <em class="parameter"><code>child_widget</code></em>) to the new
41
41
position specified by <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.
42
42
The upper, left corner of <em class="parameter"><code>child_widget</code></em> will be placed
43
 
at (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--set-size"></a><h3>gtk.Layout.set_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>width</code></strong> :</span></p></td><td>width of the layout area</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>height of the layout area</td></tr></tbody></table><p>The <code class="methodname">set_size</code>() method sets the size of
 
43
at (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).</p></div><div class="refsect2" title="gtk.Layout.set_size"><a name="method-gtklayout--set-size"></a><h3>gtk.Layout.set_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>width</code></strong> :</span></p></td><td>width of the layout area</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>height of the layout area</td></tr></tbody></table><p>The <code class="methodname">set_size</code>() method sets the size of
44
44
the virtual area of the layout to the values specified by
45
45
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>. The "width"
46
 
and "height" properties are also set by this method.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--get-size"></a><h3>gtk.Layout.get_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size</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 tuple containing the width and height set on
 
46
and "height" properties are also set by this method.</p></div><div class="refsect2" title="gtk.Layout.get_size"><a name="method-gtklayout--get-size"></a><h3>gtk.Layout.get_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size</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 tuple containing the width and height set on
47
47
<em class="parameter"><code>layout</code></em></td></tr></tbody></table><p>The <code class="methodname">get_size</code>() method returns a tuple
48
48
that contains the width and height of the virtual size that has been set on
49
 
the layout. See <a class="link" href="class-gtklayout.html#method-gtklayout--set-size" title="gtk.Layout.set_size"><code class="methodname">set_size</code>()</a>.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--get-hadjustment"></a><h3>gtk.Layout.get_hadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_hadjustment</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 horizontal adjustment</td></tr></tbody></table><p>The <code class="methodname">get_hadjustment</code>() method returns
 
49
the layout. See <a class="link" href="class-gtklayout.html#method-gtklayout--set-size" title="gtk.Layout.set_size"><code class="methodname">set_size</code>()</a>.</p></div><div class="refsect2" title="gtk.Layout.get_hadjustment"><a name="method-gtklayout--get-hadjustment"></a><h3>gtk.Layout.get_hadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_hadjustment</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 horizontal adjustment</td></tr></tbody></table><p>The <code class="methodname">get_hadjustment</code>() method returns
50
50
the value of the "hadjustment" property that contains the horizontal
51
51
adjustment object associated with the layout. This function should only be
52
52
called after the layout has been placed in a <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a> 
53
53
or has otherwise been configured for scrolling. See <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a>, 
54
54
<a class="link" href="class-gtkscrollbar.html" title="gtk.Scrollbar"><code class="classname">gtk.Scrollbar</code></a>,
55
55
<a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
56
 
for details.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--get-vadjustment"></a><h3>gtk.Layout.get_vadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_vadjustment</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 vertical adjustment</td></tr></tbody></table><p>The <code class="methodname">get_vadjustment</code>() method returns
 
56
for details.</p></div><div class="refsect2" title="gtk.Layout.get_vadjustment"><a name="method-gtklayout--get-vadjustment"></a><h3>gtk.Layout.get_vadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_vadjustment</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 vertical adjustment</td></tr></tbody></table><p>The <code class="methodname">get_vadjustment</code>() method returns
57
57
the "vadjustment" property that contains the vertical adjustment object
58
58
associated with the layout. This function should only be called after the
59
59
layout has been placed in a <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a> 
60
60
or has otherwise been configured for scrolling. See <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a>, 
61
61
<a class="link" href="class-gtkscrollbar.html" title="gtk.Scrollbar"><code class="classname">gtk.Scrollbar</code></a>,
62
62
<a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
63
 
for details.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--set-hadjustment"></a><h3>gtk.Layout.set_hadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_hadjustment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</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>adjustment</code></strong> :</span></p></td><td>a horizontal adjustment</td></tr></tbody></table><p>The <code class="methodname">set_hadjustment</code>() method sets the
 
63
for details.</p></div><div class="refsect2" title="gtk.Layout.set_hadjustment"><a name="method-gtklayout--set-hadjustment"></a><h3>gtk.Layout.set_hadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_hadjustment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</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>adjustment</code></strong> :</span></p></td><td>a horizontal adjustment</td></tr></tbody></table><p>The <code class="methodname">set_hadjustment</code>() method sets the
64
64
horizontal adjustment for the layout (and the "hadjustment" property) to the
65
65
value of <em class="parameter"><code>adjustment</code></em>. See <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a>, 
66
66
<a class="link" href="class-gtkscrollbar.html" title="gtk.Scrollbar"><code class="classname">gtk.Scrollbar</code></a>,
67
67
<a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
68
 
for details.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--set-vadjustment"></a><h3>gtk.Layout.set_vadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_vadjustment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</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>adjustment</code></strong> :</span></p></td><td>a vertical adjustment</td></tr></tbody></table><p>The <code class="methodname">set_vadjustment</code>() method sets the
 
68
for details.</p></div><div class="refsect2" title="gtk.Layout.set_vadjustment"><a name="method-gtklayout--set-vadjustment"></a><h3>gtk.Layout.set_vadjustment</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_vadjustment</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>adjustment</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>adjustment</code></strong> :</span></p></td><td>a vertical adjustment</td></tr></tbody></table><p>The <code class="methodname">set_vadjustment</code>() method sets the
69
69
vertical adjustment for the layout (and the "vadjustment" property) to the
70
70
value of <em class="parameter"><code>adjustment</code></em>. See <a class="link" href="class-gtkscrolledwindow.html" title="gtk.ScrolledWindow"><code class="classname">gtk.ScrolledWindow</code></a>, 
71
71
<a class="link" href="class-gtkscrollbar.html" title="gtk.Scrollbar"><code class="classname">gtk.Scrollbar</code></a>,
72
72
<a class="link" href="class-gtkadjustment.html" title="gtk.Adjustment"><code class="classname">gtk.Adjustment</code></a>
73
 
for details.</p></div><div class="refsect2" lang="en"><a name="method-gtklayout--get-bin-window"></a><h3>gtk.Layout.get_bin_window</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_bin_window</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
 
73
for details.</p></div><div class="refsect2" title="gtk.Layout.get_bin_window"><a name="method-gtklayout--get-bin-window"></a><h3>gtk.Layout.get_bin_window</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_bin_window</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
74
74
          <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>.
75
 
          </td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
 
75
          </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
76
76
        The <code class="methodname">get_bin_window</code>() method retrieve the bin window
77
77
        of the layout used for drawing operations.
78
 
      </p></div></div><div class="refsect1" lang="en"><a name="id3569859"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtklayout--set-scroll-adjustments"></a><h3>The "set-scroll-adjustments" gtk.Layout Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>layout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>layout</code></em> :</span></p></td><td>the layout that received the
 
78
      </p></div></div><div class="refsect1" title="Signals"><a name="id3879730"></a><h2>Signals</h2><div class="refsect2" title='The "set-scroll-adjustments" gtk.Layout Signal'><a name="signal-gtklayout--set-scroll-adjustments"></a><h3>The "set-scroll-adjustments" gtk.Layout Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>layout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>vadjustment</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>layout</code></em> :</span></p></td><td>the layout that received the
79
79
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hadjustment</code></em> :</span></p></td><td>the horizontal adjustment associated with the
80
80
layout.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>vadjustment</code></em> :</span></p></td><td>the horizontal adjustment associated with the
81
81
layout.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified