/usr/share/gtk-doc/html/pygtk/class-gtkpaned.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 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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Paned</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-gtkpagesetup.html" title="gtk.PageSetup"><link rel="next" href="class-gtkpapersize.html" title="gtk.PaperSize"></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.Paned</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkpagesetup.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkpapersize.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Paned"><a name="class-gtkpaned"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Paned</h2><p>gtk.Paned — a base class for widgets with two adjustable
panes</p></div><div class="refsect1" title="Synopsis"><a name="id3822841"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Paned</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--add1" title="gtk.Paned.add1">add1</a></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"><a class="link" href="class-gtkpaned.html#method-gtkpaned--add2" title="gtk.Paned.add2">add2</a></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"><a class="link" href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1">pack1</a></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>resize</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>shrink</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2">pack2</a></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>resize</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>shrink</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--get-position" title="gtk.Paned.get_position">get_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--set-position" title="gtk.Paned.set_position">set_position</a></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"><a class="link" href="class-gtkpaned.html#method-gtkpaned--compute-position" title="gtk.Paned.compute_position">compute_position</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child1_req</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child2_req</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--get-child1" title="gtk.Paned.get_child1">get_child1</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkpaned.html#method-gtkpaned--get-child2" title="gtk.Paned.get_child2">get_child2</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3823187"></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-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a class="link" href="class-gtkpaned.html" title="gtk.Paned">gtk.Paned</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3823232"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkpaned.html" title="gtk.Paned"><code class="classname">gtk.Paned</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.Paned Properties"><a name="properties-gtkpaned"></a><h2>gtk.Paned 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">"max-position"</td><td valign="top">Read</td><td valign="top">The largest possible value for the position property.
This property is derived from the size and shrinkability of the widget's
children. Available in GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"min-position"</td><td valign="top">Read</td><td valign="top">The smallest possible value for the position property.
This property is derived from the size and shrinkability of the widget's
children. Available in GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"position"</td><td valign="top">Read-Write</td><td valign="top">The position of the paned separator in pixels (0 means
all the way to the left or top).</td></tr><tr valign="top"><td valign="top">"position-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the "position" property is
valid.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Paned Child Properties"><a name="child-properties-gtkpaned"></a><h2>gtk.Paned 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">"resize"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the child expands and
shrinks along with the paned widget. Available in GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"shrink"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the child can be made
smaller than its requisition. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Paned Style Properties"><a name="style-properties-gtkpaned"></a><h2>gtk.Paned 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 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">"handle-size"</td><td valign="top">Read</td><td valign="top">The width of the handle</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Paned Signal Prototypes"><a name="signal-prototypes-gtkpaned"></a><h2>gtk.Paned 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-gtkpaned.html#signal-gtkpaned--accept-position" title='The "accept-position" gtk.Paned Signal'>accept-position</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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><tr><td><p><span class="term">"<a class="link" href="class-gtkpaned.html#signal-gtkpaned--cancel-position" title='The "cancel-position" gtk.Paned Signal'>cancel-position</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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><tr><td><p><span class="term">"<a class="link" href="class-gtkpaned.html#signal-gtkpaned--cycle-child-focus" title='The "cycle-child-focus" gtk.Paned Signal'>cycle-child-focus</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>reversed</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><tr><td><p><span class="term">"<a class="link" href="class-gtkpaned.html#signal-gtkpaned--cycle-handle-focus" title='The "cycle-handle-focus" gtk.Paned Signal'>cycle-handle-focus</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>reversed</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><tr><td><p><span class="term">"<a class="link" href="class-gtkpaned.html#signal-gtkpaned--move-handle" title='The "move-handle" gtk.Paned Signal'>move-handle</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</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><tr><td><p><span class="term">"<a class="link" href="class-gtkpaned.html#signal-gtkpaned--toggle-handle-focus" title='The "toggle-handle-focus" gtk.Paned Signal'>toggle-handle-focus</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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="id3824057"></a><h2>Description</h2><p><a class="link" href="class-gtkpaned.html" title="gtk.Paned"><code class="classname">gtk.Paned</code></a> is the base
class for widgets with two panes, arranged either horizontally (<a class="link" href="class-gtkhpaned.html" title="gtk.HPaned"><code class="classname">gtk.HPaned</code></a>) or
vertically (<a class="link" href="class-gtkvpaned.html" title="gtk.VPaned"><code class="classname">gtk.VPaned</code></a>). Child
widgets are added to the panes of the widget with the <a class="link" href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1"><code class="methodname">pack1</code>()</a> and
<a class="link" href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2"><code class="methodname">pack2</code>()</a>
methods. The division between the two children is set by default from the
size requests of the children, but it can be adjusted by the user.</p><p>A paned widget draws a separator between the two child widgets and
a small handle that the user can drag to adjust the division. It does not
draw any relief around the children or around the separator. (The space in
which the separator located is called the gutter.) Often, it is useful to
put each child inside a <a class="link" href="class-gtkframe.html" title="gtk.Frame"><code class="classname">gtk.Frame</code></a> with the
shadow type set to <code class="literal">gtk.SHADOW_IN</code> so that the gutter
appears as a ridge.</p><p>Each child has two options that can be set, resize and shrink. If
resize is <code class="literal">True</code>, when the <a class="link" href="class-gtkpaned.html" title="gtk.Paned"><code class="classname">gtk.Paned</code></a> is resized,
that child will expand or shrink along with the paned widget. If shrink is
<code class="literal">True</code>, the child can be made smaller than it's
requisition. Setting shrink to <code class="literal">False</code> allows the
application to set a minimum size. If resize is <code class="literal">False</code> for
both children, the resizing behaves as if resize is <code class="literal">True</code>
for both children. The application can set the position of the slider by
calling the <a class="link" href="class-gtkpaned.html#method-gtkpaned--set-position" title="gtk.Paned.set_position"><code class="methodname">set_position</code>()</a>
method.</p></div><div class="refsect1" title="Methods"><a name="id3824190"></a><h2>Methods</h2><div class="refsect2" title="gtk.Paned.add1"><a name="method-gtkpaned--add1"></a><h3>gtk.Paned.add1</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add1</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 widget to add</td></tr></tbody></table><p>The <code class="methodname">add1</code>() method adds the widget
specified by <em class="parameter"><code>child</code></em> to the top or left pane with the
default packing parameters (resize is <code class="literal">False</code> and shrink is
<code class="literal">True</code>). See the <a class="link" href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1"><code class="methodname">pack1</code>()</a>
method.</p></div><div class="refsect2" title="gtk.Paned.add2"><a name="method-gtkpaned--add2"></a><h3>gtk.Paned.add2</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add2</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 widget to add</td></tr></tbody></table><p>The <code class="methodname">add2</code>() method adds the widget
specified by <em class="parameter"><code>child</code></em> to the bottom or right pane with
the default packing parameters (resize is <code class="literal">True</code> and shrink
is <code class="literal">True</code>). See the <a class="link" href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2"><code class="methodname">pack2</code>()</a>
method.</p></div><div class="refsect2" title="gtk.Paned.pack1"><a name="method-gtkpaned--pack1"></a><h3>gtk.Paned.pack1</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack1</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>resize</code></strong></span><span class="initializer">=False</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>shrink</code></strong></span><span class="initializer">=True</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 widget to add</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>resize</code></strong> :</span></p></td><td>if <code class="literal">True</code>
<em class="parameter"><code>child</code></em> should resize when the paned is
resized</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>shrink</code></strong> :</span></p></td><td>if <code class="literal">True</code>
<em class="parameter"><code>child</code></em> can be made smaller than its
minimum size request</td></tr></tbody></table><p>The <code class="methodname">pack1</code>() method adds the widget
specified by <em class="parameter"><code>child</code></em> to the top or left pane with the
parameters specified by <em class="parameter"><code>resize</code></em> and
<em class="parameter"><code>shrink</code></em>. If <em class="parameter"><code>resize</code></em> is
<code class="literal">True</code> <em class="parameter"><code>child</code></em> should be resized when
the paned widget is resized. If <em class="parameter"><code>shrink</code></em> is
<code class="literal">True</code> <em class="parameter"><code>child</code></em> can be made smaller
than its minimum size request.</p></div><div class="refsect2" title="gtk.Paned.pack2"><a name="method-gtkpaned--pack2"></a><h3>gtk.Paned.pack2</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack2</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>resize</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>shrink</code></strong></span><span class="initializer">=True</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 widget to add</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>resize</code></strong> :</span></p></td><td>if <code class="literal">True</code>
<em class="parameter"><code>child</code></em> should resize when the paned is
resized</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>shrink</code></strong> :</span></p></td><td>if <code class="literal">True</code>
<em class="parameter"><code>child</code></em> can be made smaller than its
minimum size request</td></tr></tbody></table><p>The <code class="methodname">pack2</code>() method adds the widget
specified by <em class="parameter"><code>child</code></em> to the bottom or right pane with
the parameters specified by <em class="parameter"><code>resize</code></em> and
<em class="parameter"><code>shrink</code></em>. If <em class="parameter"><code>resize</code></em> is
<code class="literal">True</code> <em class="parameter"><code>child</code></em> should be resized when
the paned widget is resized. If <em class="parameter"><code>shrink</code></em> is
<code class="literal">True</code> <em class="parameter"><code>child</code></em> can be made smaller
than its minimum size request.</p></div><div class="refsect2" title="gtk.Paned.get_position"><a name="method-gtkpaned--get-position"></a><h3>gtk.Paned.get_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_position</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>the position of the divider</td></tr></tbody></table><p>The <code class="methodname">get_position</code>() method returns the
position of the divider in pixels between the two panes.</p></div><div class="refsect2" title="gtk.Paned.set_position"><a name="method-gtkpaned--set-position"></a><h3>gtk.Paned.set_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_position</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>position</code></strong> :</span></p></td><td>the new pixel position of divider, a negative
value means that the position is unset.</td></tr></tbody></table><p>The <code class="methodname">set_position</code>() method sets the
position of the divider between the two panes to the value specified by
<em class="parameter"><code>position</code></em> and sets the "position-set" property to
<code class="literal">True</code> if <em class="parameter"><code>position</code></em> is non-negative.
If <em class="parameter"><code>position</code></em> is negative the divider position will be
recalculated by the paned widget using the child widget requisitions and the
"position-set" property will be set to <code class="literal">False</code>.</p></div><div class="refsect2" title="gtk.Paned.compute_position"><a name="method-gtkpaned--compute-position"></a><h3>gtk.Paned.compute_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">compute_position</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>allocation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child1_req</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child2_req</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>allocation</code></strong> :</span></p></td><td>the total space allocation in pixels for the
paned widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>child1_req</code></strong> :</span></p></td><td>the minimum space in pixels required for the
left or top child widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>child2_req</code></strong> :</span></p></td><td>the minimum space in pixels required for the
right or bottom child widget</td></tr></tbody></table><p>The <code class="methodname">compute_position</code>() method computes
the position of the separator according to the specification of the
parameters: <em class="parameter"><code>allocation</code></em>,
<em class="parameter"><code>child1_req</code></em> and <em class="parameter"><code>child2_req</code></em>. The
calculation is affected by the packing parameters of the child widgets
depending on whether they can resize and shrink. This method is used by
subclasses of <a class="link" href="class-gtkpaned.html" title="gtk.Paned"><code class="classname">gtk.Paned</code></a> and is
usually not needed by applications. the <a class="link" href="class-gtkwidget.html#method-gtkwidget--queue-resize" title="gtk.Widget.queue_resize"><code class="methodname">gtk.Widget.queue_resize</code>()</a>
method must be called after this method to have the resizing
displayed.</p><p>The minimum position is 0 if child1's shrink value is
<code class="literal">True</code> or the value of <em class="parameter"><code>child1_req</code></em>,
if <code class="literal">False</code>. The maximum position is the value of
<em class="parameter"><code>allocation</code></em> if child2's shrink value is True, or the
value of (<em class="parameter"><code>allocation</code></em> -
<em class="parameter"><code>child2_req</code></em>), if <code class="literal">False</code>. The final
calculated position will be between the minimum and maximum
positions.</p></div><div class="refsect2" title="gtk.Paned.get_child1"><a name="method-gtkpaned--get-child1"></a><h3>gtk.Paned.get_child1</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child1</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>the first child, or<code class="literal">None</code></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.4 and above.</p></div><p>The <code class="methodname">get_child1</code>() method returns the
first child of the paned widget.</p></div><div class="refsect2" title="gtk.Paned.get_child2"><a name="method-gtkpaned--get-child2"></a><h3>gtk.Paned.get_child2</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_child2</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>the second child, or
<code class="literal">None</code></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.4 and above.</p></div><p>The <code class="methodname">get_child2</code>() method returns
the second child of the paned widget.</p></div></div><div class="refsect1" title="Signals"><a name="id3825372"></a><h2>Signals</h2><div class="refsect2" title='The "accept-position" gtk.Paned Signal'><a name="signal-gtkpaned--accept-position"></a><h3>The "accept-position" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "accept-position" signal is emitted when
<em class="parameter"><code>paned</code></em> has the focus and any of the
<span class="keycap"><strong>Return</strong></span>, <span class="keycap"><strong>Enter</strong></span>, <span class="keycap"><strong>Space</strong></span> keys
are pressed. This will also cause the child widget with the focus to be
activated.</p></div><div class="refsect2" title='The "cancel-position" gtk.Paned Signal'><a name="signal-gtkpaned--cancel-position"></a><h3>The "cancel-position" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "cancel-position" signal is emitted when the
<span class="keycap"><strong>Esc</strong></span> key is pressed while <em class="parameter"><code>paned</code></em> has
the focus.</p></div><div class="refsect2" title='The "cycle-child-focus" gtk.Paned Signal'><a name="signal-gtkpaned--cycle-child-focus"></a><h3>The "cycle-child-focus" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>reversed</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>reversed</code></em> :</span></p></td><td>if <code class="literal">True</code> the focus cycle
direction should be reversed</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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "cycle-child-focus" signal is emitted when
<span class="keycap"><strong>F6</strong></span> or <span class="keycap"><strong>Shift</strong></span>+<span class="keycap"><strong>F6</strong></span> is
pressed while <em class="parameter"><code>paned</code></em> has the focus.</p></div><div class="refsect2" title='The "cycle-handle-focus" gtk.Paned Signal'><a name="signal-gtkpaned--cycle-handle-focus"></a><h3>The "cycle-handle-focus" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>reversed</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>reversed</code></em> :</span></p></td><td>if <code class="literal">True</code> the focus cycle
direction should be reversed</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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "cycle-handle-focus" signal is emitted when
<em class="parameter"><code>paned</code></em> has the focus and any of the
<span class="keycap"><strong>Tab</strong></span>,
<span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>Tab</strong></span>, <span class="keycap"><strong>Shift</strong></span>+<span class="keycap"><strong>Tab</strong></span> or
<span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>Shift</strong></span>+<span class="keycap"><strong>Tab</strong></span> keys combinations are pressed. <span class="keycap"><strong>Tab</strong></span> and
<span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>Tab</strong></span> set <em class="parameter"><code>reversed</code></em> to
<code class="literal">False</code> while
<span class="keycap"><strong>Shift</strong></span>+<span class="keycap"><strong>Tab</strong></span> and <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>Shift</strong></span>+<span class="keycap"><strong>Tab</strong></span> set <em class="parameter"><code>reversed</code></em> to
<code class="literal">True</code>.</p></div><div class="refsect2" title='The "move-handle" gtk.Paned Signal'><a name="signal-gtkpaned--move-handle"></a><h3>The "move-handle" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>scrolltype</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>scrolltype</code></em> :</span></p></td><td>the scroll type:
<code class="literal">gtk.SCROLL_NONE</code>, <code class="literal">gtk.SCROLL_JUMP</code>,
<code class="literal">gtk.SCROLL_STEP_BACKWARD</code>,
<code class="literal">gtk.SCROLL_STEP_FORWARD</code>,
<code class="literal">gtk.SCROLL_PAGE_BACKWARD</code>,
<code class="literal">gtk.SCROLL_PAGE_FORWARD</code>,
<code class="literal">gtk.SCROLL_STEP_UP</code>,
<code class="literal">gtk.SCROLL_STEP_DOWN</code>,
<code class="literal">gtk.SCROLL_PAGE_UP</code>,
<code class="literal">gtk.SCROLL_PAGE_DOWN</code>,
<code class="literal">gtk.SCROLL_STEP_LEFT</code>,
<code class="literal">gtk.SCROLL_STEP_RIGHT</code>,
<code class="literal">gtk.SCROLL_PAGE_LEFT</code>,
<code class="literal">gtk.SCROLL_PAGE_RIGHT</code>,
<code class="literal">gtk.SCROLL_START</code> or
<code class="literal">gtk.SCROLL_END</code></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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "move-handle" signal is emitted when
<em class="parameter"><code>paned</code></em> has the focus and one of the following key
combinations is pressed to move the separator:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="keycap"><strong>Left
Arrow</strong></span></li><li class="listitem"><span class="keycap"><strong>Right
Arrow</strong></span></li><li class="listitem"><span class="keycap"><strong>Up Arrow</strong></span></li><li class="listitem"><span class="keycap"><strong>Down
Arrow</strong></span></li><li class="listitem"><span class="keycap"><strong>Page Up</strong></span></li><li class="listitem"><span class="keycap"><strong>Page Down</strong></span></li><li class="listitem"><span class="keycap"><strong>Home</strong></span></li><li class="listitem"><span class="keycap"><strong>End</strong></span></li></ul></div><p>The value of <em class="parameter"><code>scrolltype</code></em> is one of:
<code class="literal">gtk.SCROLL_NONE</code>, <code class="literal">gtk.SCROLL_JUMP</code>,
<code class="literal">gtk.SCROLL_STEP_BACKWARD</code>,
<code class="literal">gtk.SCROLL_STEP_FORWARD</code>,
<code class="literal">gtk.SCROLL_PAGE_BACKWARD</code>,
<code class="literal">gtk.SCROLL_PAGE_FORWARD</code>,
<code class="literal">gtk.SCROLL_STEP_UP</code>,
<code class="literal">gtk.SCROLL_STEP_DOWN</code>,
<code class="literal">gtk.SCROLL_PAGE_UP</code>,
<code class="literal">gtk.SCROLL_PAGE_DOWN</code>,
<code class="literal">gtk.SCROLL_STEP_LEFT</code>,
<code class="literal">gtk.SCROLL_STEP_RIGHT</code>,
<code class="literal">gtk.SCROLL_PAGE_LEFT</code>,
<code class="literal">gtk.SCROLL_PAGE_RIGHT</code>,
<code class="literal">gtk.SCROLL_START</code> or <code class="literal">gtk.SCROLL_END</code>.
The default handler for this signal moves the separator if the separator has
the focus.</p></div><div class="refsect2" title='The "toggle-handle-focus" gtk.Paned Signal'><a name="signal-gtkpaned--toggle-handle-focus"></a><h3>The "toggle-handle-focus" gtk.Paned Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>paned</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>paned</code></em> :</span></p></td><td>the paned that received the
signal</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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><p>The "toggle-handle-focus" signal is emitted when
<em class="parameter"><code>paned</code></em> has the focus and <span class="keycap"><strong>F8</strong></span> is
pressed to give the focus to or take the focus from the separator
handle.</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-gtkpagesetup.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-gtkpapersize.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.PageSetup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.PaperSize</td></tr></table></div></body></html>
|