File: class-gtkpaned.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (184 lines) | stat: -rw-r--r-- 40,821 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Paned</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.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="previous" href="class-gtkoptionmenu.html" title="gtk.OptionMenu"><link rel="next" href="class-gtkplug.html" title="gtk.Plug"></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-gtkoptionmenu.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkplug.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkpaned"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Paned</h2><p>gtk.Paned &#8212; a base class for widgets with two adjustable
panes</p></div><div class="refsect1" lang="en"><a name="id3479726"></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 href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkpaned.html#method-gtkpaned--add1" title="gtk.Paned.add1">add1</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkpaned.html#method-gtkpaned--add2" title="gtk.Paned.add2">add2</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1">pack1</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>resize</tt></b></span><span class="initializer">=FALSE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>shrink</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2">pack2</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>resize</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>shrink</tt></b></span><span class="initializer">=TRUE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 href="class-gtkpaned.html#method-gtkpaned--set-position" title="gtk.Paned.set_position">set_position</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkpaned.html#method-gtkpaned--compute-position" title="gtk.Paned.compute_position">compute_position</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>allocation</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>child1_req</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>child2_req</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a 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 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" lang="en"><a name="id3479975"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a href="class-gtkpaned.html" title="gtk.Paned">gtk.Paned</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3480017"></a><h2>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">"max-position"</td><td valign="top">Read-Write</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-Write</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 <tt class="literal">TRUE</tt>, the "position" property is
valid.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3480150"></a><h2>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">"resize"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, 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 <tt class="literal">TRUE</tt>, 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" lang="en"><a name="id3480247"></a><h2>Style 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">"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" lang="en"><a name="id3480317"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--accept-position" title='The "accept-position" gtk.Paned Signal'>accept-position</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--cancel-position" title='The "cancel-position" gtk.Paned Signal'>cancel-position</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--cycle-child-focus" title='The "cycle-child-focus" gtk.Paned Signal'>cycle-child-focus</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>reversed</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--cycle-handle-focus" title='The "cycle-handle-focus" gtk.Paned Signal'>cycle-handle-focus</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>reversed</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--move-handle" title='The "move-handle" gtk.Paned Signal'>move-handle</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>scrolltype</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkpaned.html#signal-gtkpaned--toggle-handle-focus" title='The "toggle-handle-focus" gtk.Paned Signal'>toggle-handle-focus</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3480588"></a><h2>Description</h2><p><a href="class-gtkpaned.html" title="gtk.Paned"><tt class="classname">gtk.Paned</tt></a> is the base
class for widgets with two panes, arranged either horizontally (<a href="class-gtkhpaned.html" title="gtk.HPaned"><tt class="classname">gtk.HPaned</tt></a>) or
vertically (<a href="class-gtkvpaned.html" title="gtk.VPaned"><tt class="classname">gtk.VPaned</tt></a>). Child
widgets are added to the panes of the widget with the <a href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1"><tt class="methodname">pack1</tt>()</a> and
<a href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2"><tt class="methodname">pack2</tt>()</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 href="class-gtkframe.html" title="gtk.Frame"><tt class="classname">gtk.Frame</tt></a> with the
shadow type set to <tt class="literal">gtk.SHADOW_IN</tt> 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 <tt class="literal">TRUE</tt>, when the <a href="class-gtkpaned.html" title="gtk.Paned"><tt class="classname">gtk.Paned</tt></a> is resized,
that child will expand or shrink along with the paned widget. If shrink is
<tt class="literal">TRUE</tt>, the child can be made smaller than it's
requisition. Setting shrink to <tt class="literal">FALSE</tt> allows the
application to set a minimum size. If resize is <tt class="literal">FALSE</tt> for
both children, the resizing behaves as if resize is <tt class="literal">TRUE</tt>
for both children. The application can set the position of the slider by
calling the <a href="class-gtkpaned.html#method-gtkpaned--set-position" title="gtk.Paned.set_position"><tt class="methodname">set_position</tt>()</a> 
method.</p></div><div class="refsect1" lang="en"><a name="id3480708"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkpaned--add1"></a><h3>gtk.Paned.add1</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add1</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>the widget to add</td></tr></tbody></table><p>The <tt class="methodname">add1</tt>() method adds the widget
specified by <i class="parameter"><tt>child</tt></i> to the top or left pane with the
default packing parameters (resize is <tt class="literal">FALSE</tt> and shrink is
<tt class="literal">TRUE</tt>). See the <a href="class-gtkpaned.html#method-gtkpaned--pack1" title="gtk.Paned.pack1"><tt class="methodname">pack1</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--add2"></a><h3>gtk.Paned.add2</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add2</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>the widget to add</td></tr></tbody></table><p>The <tt class="methodname">add2</tt>() method adds the widget
specified by <i class="parameter"><tt>child</tt></i> to the bottom or right pane with
the default packing parameters (resize is <tt class="literal">TRUE</tt> and shrink
is <tt class="literal">TRUE</tt>). See the <a href="class-gtkpaned.html#method-gtkpaned--pack2" title="gtk.Paned.pack2"><tt class="methodname">pack2</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--pack1"></a><h3>gtk.Paned.pack1</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack1</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>resize</tt></b></span><span class="initializer">=FALSE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>shrink</tt></b></span><span class="initializer">=TRUE</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>the widget to add</td></tr><tr><td><span class="term"><b class="parameter"><tt>resize</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>child</tt></i> should resize when the paned is
resized</td></tr><tr><td><span class="term"><b class="parameter"><tt>shrink</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>child</tt></i> can be made smaller than its
minimum size request</td></tr></tbody></table><p>The <tt class="methodname">pack1</tt>() method adds the widget
specified by <i class="parameter"><tt>child</tt></i> to the top or left pane with the
parameters specified by <i class="parameter"><tt>resize</tt></i> and
<i class="parameter"><tt>shrink</tt></i>. If <i class="parameter"><tt>resize</tt></i> is
<tt class="literal">TRUE</tt> <i class="parameter"><tt>child</tt></i> should be resized when
the paned widget is resized. If <i class="parameter"><tt>shrink</tt></i> is
<tt class="literal">TRUE</tt> <i class="parameter"><tt>child</tt></i> can be made smaller
than its minimum size request.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--pack2"></a><h3>gtk.Paned.pack2</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pack2</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>resize</tt></b></span><span class="initializer">=TRUE</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>shrink</tt></b></span><span class="initializer">=TRUE</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>the widget to add</td></tr><tr><td><span class="term"><b class="parameter"><tt>resize</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>child</tt></i> should resize when the paned is
resized</td></tr><tr><td><span class="term"><b class="parameter"><tt>shrink</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>
<i class="parameter"><tt>child</tt></i> can be made smaller than its
minimum size request</td></tr></tbody></table><p>The <tt class="methodname">pack2</tt>() method adds the widget
specified by <i class="parameter"><tt>child</tt></i> to the bottom or right pane with
the parameters specified by <i class="parameter"><tt>resize</tt></i> and
<i class="parameter"><tt>shrink</tt></i>. If <i class="parameter"><tt>resize</tt></i> is
<tt class="literal">TRUE</tt> <i class="parameter"><tt>child</tt></i> should be resized when
the paned widget is resized. If <i class="parameter"><tt>shrink</tt></i> is
<tt class="literal">TRUE</tt> <i class="parameter"><tt>child</tt></i> can be made smaller
than its minimum size request.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--get-position"></a><h3>gtk.Paned.get_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_position</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the position of the divider</td></tr></tbody></table><p>The <tt class="methodname">get_position</tt>() method returns the
position of the divider in pixels between the two panes.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--set-position"></a><h3>gtk.Paned.set_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_position</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the new pixel position of divider, a negative
value means that the position is unset.</td></tr></tbody></table><p>The <tt class="methodname">set_position</tt>() method sets the
position of the divider between the two panes to the value specified by
<i class="parameter"><tt>position</tt></i> and sets the "position-set" property to
<tt class="literal">TRUE</tt> if <i class="parameter"><tt>position</tt></i> is non-negative.
If <i class="parameter"><tt>position</tt></i> 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 <tt class="literal">FALSE</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--compute-position"></a><h3>gtk.Paned.compute_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">compute_position</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>allocation</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>child1_req</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>child2_req</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>allocation</tt></b>:</span></td><td>the total space allocation in pixels for the
paned widget</td></tr><tr><td><span class="term"><b class="parameter"><tt>child1_req</tt></b>:</span></td><td>the minimum space in pixels required for the
left or top child widget</td></tr><tr><td><span class="term"><b class="parameter"><tt>child2_req</tt></b>:</span></td><td>the minimum space in pixels required for the
right or bottom child widget</td></tr></tbody></table><p>The <tt class="methodname">compute_position</tt>() method computes
the position of the separator according to the specification of the
parameters: <i class="parameter"><tt>allocation</tt></i>,
<i class="parameter"><tt>child1_req</tt></i> and <i class="parameter"><tt>child2_req</tt></i>. 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 href="class-gtkpaned.html" title="gtk.Paned"><tt class="classname">gtk.Paned</tt></a> and is
usually not needed by applications. the <a href="class-gtkwidget.html#method-gtkwidget--queue-resize" title="gtk.Widget.queue_resize"><tt class="methodname">gtk.Widget.queue_resize</tt>()</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
<tt class="literal">TRUE</tt> or the value of <i class="parameter"><tt>child1_req</tt></i>,
if <tt class="literal">FALSE</tt>. The maximum position is the value of
<i class="parameter"><tt>allocation</tt></i> if child2's shrink value is TRUE, or the
value of (<i class="parameter"><tt>allocation</tt></i> -
<i class="parameter"><tt>child2_req</tt></i>), if <tt class="literal">FALSE</tt>. The final
calculated position will be between the minimum and maximum
positions.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--get-child1"></a><h3>gtk.Paned.get_child1</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_child1</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the first child, or<tt class="literal">None</tt></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.4 and above.</p></div><p>The <tt class="methodname">get_child1</tt>() method returns the
first child of the paned widget.</p></div><div class="refsect2" lang="en"><a name="method-gtkpaned--get-child2"></a><h3>gtk.Paned.get_child2</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_child2</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the second child, or
<tt class="literal">None</tt></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.4 and above.</p></div><p>The <tt class="methodname">get_child2</tt>() method returns 
the second child of the paned widget.</p></div></div><div class="refsect1" lang="en"><a name="id3481639"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkpaned--accept-position"></a><h3>The "accept-position" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "accept-position" signal is emitted when
<i class="parameter"><tt>paned</tt></i> has the focus and any of the
<span><b class="keycap">Return</b></span>, <span><b class="keycap">Enter</b></span>, <span><b class="keycap">Space</b></span> keys
are pressed. This will also cause the child widget with the focus to be
activated.</p></div><div class="refsect2" lang="en"><a name="signal-gtkpaned--cancel-position"></a><h3>The "cancel-position" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "cancel-position" signal is emitted when the
<span><b class="keycap">Esc</b></span> key is pressed while <i class="parameter"><tt>paned</tt></i> has
the focus.</p></div><div class="refsect2" lang="en"><a name="signal-gtkpaned--cycle-child-focus"></a><h3>The "cycle-child-focus" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>reversed</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>reversed</tt></i>:</span></td><td>if <tt class="literal">TRUE</tt> the focus cycle
direction should be reversed</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "cycle-child-focus" signal is emitted when
<span><b class="keycap">F6</b></span> or <span><b class="keycap">Shift</b></span>+<span><b class="keycap">F6</b></span> is
pressed while <i class="parameter"><tt>paned</tt></i> has the focus.</p></div><div class="refsect2" lang="en"><a name="signal-gtkpaned--cycle-handle-focus"></a><h3>The "cycle-handle-focus" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>reversed</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>reversed</tt></i>:</span></td><td>if <tt class="literal">TRUE</tt> the focus cycle
direction should be reversed</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "cycle-handle-focus" signal is emitted when
<i class="parameter"><tt>paned</tt></i> has the focus and any of the
<span><b class="keycap">Tab</b></span>,
<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Tab</b></span>, <span><b class="keycap">Shift</b></span>+<span><b class="keycap">Tab</b></span> or
<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Shift</b></span>+<span><b class="keycap">Tab</b></span>  keys combinations are pressed. <span><b class="keycap">Tab</b></span> and
<span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Tab</b></span> set <i class="parameter"><tt>reversed</tt></i> to
<tt class="literal">FALSE</tt> while
<span><b class="keycap">Shift</b></span>+<span><b class="keycap">Tab</b></span> and <span><b class="keycap">Ctrl</b></span>+<span><b class="keycap">Shift</b></span>+<span><b class="keycap">Tab</b></span> set <i class="parameter"><tt>reversed</tt></i> to
<tt class="literal">TRUE</tt>.</p></div><div class="refsect2" lang="en"><a name="signal-gtkpaned--move-handle"></a><h3>The "move-handle" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>scrolltype</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>scrolltype</tt></i>:</span></td><td>the scroll type:
<tt class="literal">gtk.SCROLL_NONE</tt>, <tt class="literal">gtk.SCROLL_JUMP</tt>,
<tt class="literal">gtk.SCROLL_STEP_BACKWARD</tt>,
<tt class="literal">gtk.SCROLL_STEP_FORWARD</tt>,
<tt class="literal">gtk.SCROLL_PAGE_BACKWARD</tt>,
<tt class="literal">gtk.SCROLL_PAGE_FORWARD</tt>,
<tt class="literal">gtk.SCROLL_STEP_UP</tt>,
<tt class="literal">gtk.SCROLL_STEP_DOWN</tt>,
<tt class="literal">gtk.SCROLL_PAGE_UP</tt>,
<tt class="literal">gtk.SCROLL_PAGE_DOWN</tt>,
<tt class="literal">gtk.SCROLL_STEP_LEFT</tt>,
<tt class="literal">gtk.SCROLL_STEP_RIGHT</tt>,
<tt class="literal">gtk.SCROLL_PAGE_LEFT</tt>,
<tt class="literal">gtk.SCROLL_PAGE_RIGHT</tt>,
<tt class="literal">gtk.SCROLL_START</tt> or
<tt class="literal">gtk.SCROLL_END</tt></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "move-handle" signal is emitted when
<i class="parameter"><tt>paned</tt></i> has the focus and one of the following key
combinations is pressed to move the separator:</p><div class="itemizedlist"><ul type="disc"><li><span><b class="keycap">Left
Arrow</b></span></li><li><span><b class="keycap">Right
Arrow</b></span></li><li><span><b class="keycap">Up Arrow</b></span></li><li><span><b class="keycap">Down
Arrow</b></span></li><li><span><b class="keycap">Page Up</b></span></li><li><span><b class="keycap">Page Down</b></span></li><li><span><b class="keycap">Home</b></span></li><li><span><b class="keycap">End</b></span></li></ul></div><p>The value of <i class="parameter"><tt>scrolltype</tt></i> is one of:
<tt class="literal">gtk.SCROLL_NONE</tt>, <tt class="literal">gtk.SCROLL_JUMP</tt>,
<tt class="literal">gtk.SCROLL_STEP_BACKWARD</tt>,
<tt class="literal">gtk.SCROLL_STEP_FORWARD</tt>,
<tt class="literal">gtk.SCROLL_PAGE_BACKWARD</tt>,
<tt class="literal">gtk.SCROLL_PAGE_FORWARD</tt>,
<tt class="literal">gtk.SCROLL_STEP_UP</tt>,
<tt class="literal">gtk.SCROLL_STEP_DOWN</tt>,
<tt class="literal">gtk.SCROLL_PAGE_UP</tt>,
<tt class="literal">gtk.SCROLL_PAGE_DOWN</tt>,
<tt class="literal">gtk.SCROLL_STEP_LEFT</tt>,
<tt class="literal">gtk.SCROLL_STEP_RIGHT</tt>,
<tt class="literal">gtk.SCROLL_PAGE_LEFT</tt>,
<tt class="literal">gtk.SCROLL_PAGE_RIGHT</tt>,
<tt class="literal">gtk.SCROLL_START</tt> or <tt class="literal">gtk.SCROLL_END</tt>.
The default handler for this signal moves the separator if the separator has
the focus.</p></div><div class="refsect2" lang="en"><a name="signal-gtkpaned--toggle-handle-focus"></a><h3>The "toggle-handle-focus" gtk.Paned Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>paned</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>paned</tt></i>:</span></td><td>the paned that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
handled</td></tr></tbody></table><p>The "toggle-handle-focus" signal is emitted when
<i class="parameter"><tt>paned</tt></i> has the focus and <span><b class="keycap">F8</b></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-gtkoptionmenu.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-gtkplug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.OptionMenu</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Plug</td></tr></table></div></body></html>