summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gtkpaned.xml
blob: a7610c0517bb8a37c878c4a536f5f842a216d988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkpaned">
  <refnamediv>
    <refname>gtk.Paned</refname>
    <refpurpose>a base class for widgets with two adjustable
panes</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.Paned</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--add1">add1</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--add2">add2</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--pack1">pack1</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">resize</parameter><initializer>False</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">shrink</parameter><initializer>True</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--pack2">pack2</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">resize</parameter><initializer>True</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">shrink</parameter><initializer>True</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--get-position">get_position</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--set-position">set_position</link></methodname>
	<methodparam><parameter
		       role="keyword">position</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkpaned--compute-position">compute_position</link></methodname>
	<methodparam><parameter
		       role="keyword">allocation</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">child1_req</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">child2_req</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkpaned--get-child1">get_child1</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkpaned--get-child2">get_child2</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkpaned">gtk.Paned</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkpaned"><classname>gtk.Paned</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkpaned">
    <title>gtk.Paned Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"max-position"</entry>
	      <entry>Read</entry>
	      <entry>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.</entry>
	    </row>

	    <row valign="top">
	      <entry>"min-position"</entry>
	      <entry>Read</entry>
	      <entry>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.</entry>
	    </row>

	    <row valign="top">
	      <entry>"position"</entry>
	      <entry>Read-Write</entry>
	      <entry>The position of the paned separator in pixels (0 means
all the way to the left or top).</entry>
	    </row>

	    <row valign="top">
	      <entry>"position-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the "position" property is
valid.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="child-properties-gtkpaned">
    <title>gtk.Paned Child Properties</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"resize"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the child expands and
shrinks along with the paned widget. Available in GTK+ 2.4 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"shrink"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the child can be made
smaller than its requisition. Available in GTK+ 2.4 and above.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtkpaned">
    <title>gtk.Paned Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"handle-size"</entry>
	      <entry>Read</entry>
	      <entry>The width of the handle</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkpaned">
    <title>gtk.Paned Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--accept-position">accept-position</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--cancel-position">cancel-position</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--cycle-child-focus">cycle-child-focus</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>reversed</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--cycle-handle-focus">cycle-handle-focus</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>reversed</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--move-handle">move-handle</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>scrolltype</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link
linkend="signal-gtkpaned--toggle-handle-focus">toggle-handle-focus</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>paned</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para><link
linkend="class-gtkpaned"><classname>gtk.Paned</classname></link> is the base
class for widgets with two panes, arranged either horizontally (<link
linkend="class-gtkhpaned"><classname>gtk.HPaned</classname></link>) or
vertically (<link
linkend="class-gtkvpaned"><classname>gtk.VPaned</classname></link>). Child
widgets are added to the panes of the widget with the <link
linkend="method-gtkpaned--pack1"><methodname>pack1</methodname>()</link> and
<link
linkend="method-gtkpaned--pack2"><methodname>pack2</methodname>()</link>
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.</para>

    <para>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 <link
linkend="class-gtkframe"><classname>gtk.Frame</classname></link> with the
shadow type set to <literal>gtk.SHADOW_IN</literal> so that the gutter
appears as a ridge.</para>

    <para>Each child has two options that can be set, resize and shrink. If
resize is <literal>True</literal>, when the <link
linkend="class-gtkpaned"><classname>gtk.Paned</classname></link> is resized,
that child will expand or shrink along with the paned widget. If shrink is
<literal>True</literal>, the child can be made smaller than it's
requisition. Setting shrink to <literal>False</literal> allows the
application to set a minimum size. If resize is <literal>False</literal> for
both children, the resizing behaves as if resize is <literal>True</literal>
for both children. The application can set the position of the slider by
calling the <link
linkend="method-gtkpaned--set-position"><methodname>set_position</methodname>()</link> 
method.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkpaned--add1">
      <title>gtk.Paned.add1</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>add1</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to add</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>add1</methodname>() method adds the widget
specified by <parameter>child</parameter> to the top or left pane with the
default packing parameters (resize is <literal>False</literal> and shrink is
<literal>True</literal>). See the <link
linkend="method-gtkpaned--pack1"><methodname>pack1</methodname>()</link>
method.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--add2">
      <title>gtk.Paned.add2</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>add2</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to add</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>add2</methodname>() method adds the widget
specified by <parameter>child</parameter> to the bottom or right pane with
the default packing parameters (resize is <literal>True</literal> and shrink
is <literal>True</literal>). See the <link
linkend="method-gtkpaned--pack2"><methodname>pack2</methodname>()</link>
method.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--pack1">
      <title>gtk.Paned.pack1</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>pack1</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">resize</parameter><initializer>False</initializer></methodparam>
	  <methodparam><parameter
			 role="keyword">shrink</parameter><initializer>True</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to add</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">resize</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>
<parameter>child</parameter> should resize when the paned is
resized</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">shrink</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>
<parameter>child</parameter> can be made smaller than its
minimum size request</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>pack1</methodname>() method adds the widget
specified by <parameter>child</parameter> to the top or left pane with the
parameters specified by <parameter>resize</parameter> and
<parameter>shrink</parameter>. If <parameter>resize</parameter> is
<literal>True</literal> <parameter>child</parameter> should be resized when
the paned widget is resized. If <parameter>shrink</parameter> is
<literal>True</literal> <parameter>child</parameter> can be made smaller
than its minimum size request.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--pack2">
      <title>gtk.Paned.pack2</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>pack2</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">resize</parameter><initializer>True</initializer></methodparam>
	  <methodparam><parameter
			 role="keyword">shrink</parameter><initializer>True</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to add</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">resize</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>
<parameter>child</parameter> should resize when the paned is
resized</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">shrink</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>
<parameter>child</parameter> can be made smaller than its
minimum size request</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>pack2</methodname>() method adds the widget
specified by <parameter>child</parameter> to the bottom or right pane with
the parameters specified by <parameter>resize</parameter> and
<parameter>shrink</parameter>. If <parameter>resize</parameter> is
<literal>True</literal> <parameter>child</parameter> should be resized when
the paned widget is resized. If <parameter>shrink</parameter> is
<literal>True</literal> <parameter>child</parameter> can be made smaller
than its minimum size request.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--get-position">
      <title>gtk.Paned.get_position</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_position</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the position of the divider</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_position</methodname>() method returns the
position of the divider in pixels between the two panes.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--set-position">
      <title>gtk.Paned.set_position</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_position</methodname>
	  <methodparam><parameter
			 role="keyword">position</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">position</parameter>&nbsp;:</term>
	  <listitem><simpara>the new pixel position of divider, a negative
value means that the position is unset.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_position</methodname>() method sets the
position of the divider between the two panes to the value specified by
<parameter>position</parameter> and sets the "position-set" property to
<literal>True</literal> if <parameter>position</parameter> is non-negative.
If <parameter>position</parameter> 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 <literal>False</literal>.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--compute-position">
      <title>gtk.Paned.compute_position</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>compute_position</methodname>
	  <methodparam><parameter
			 role="keyword">allocation</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">child1_req</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">child2_req</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">allocation</parameter>&nbsp;:</term>
	  <listitem><simpara>the total space allocation in pixels for the
paned widget</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">child1_req</parameter>&nbsp;:</term>
	  <listitem><simpara>the minimum space in pixels required for the
left or top child widget</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">child2_req</parameter>&nbsp;:</term>
	  <listitem><simpara>the minimum space in pixels required for the
right or bottom child widget</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>compute_position</methodname>() method computes
the position of the separator according to the specification of the
parameters: <parameter>allocation</parameter>,
<parameter>child1_req</parameter> and <parameter>child2_req</parameter>. 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 <link
linkend="class-gtkpaned"><classname>gtk.Paned</classname></link> and is
usually not needed by applications. the <link
linkend="method-gtkwidget--queue-resize"><methodname>gtk.Widget.queue_resize</methodname>()</link> 
method must be called after this method to have the resizing
displayed.</para>

      <para>The minimum position is 0 if child1's shrink value is
<literal>True</literal> or the value of <parameter>child1_req</parameter>,
if <literal>False</literal>. The maximum position is the value of
<parameter>allocation</parameter> if child2's shrink value is True, or the
value of (<parameter>allocation</parameter> -
<parameter>child2_req</parameter>), if <literal>False</literal>. The final
calculated position will be between the minimum and maximum
positions.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--get-child1">
      <title>gtk.Paned.get_child1</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_child1</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the first child, or<literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in  PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>get_child1</methodname>() method returns the
first child of the paned widget.</para>

    </refsect2>

    <refsect2 id="method-gtkpaned--get-child2">
      <title>gtk.Paned.get_child2</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_child2</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the second child, or
<literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in  PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>get_child2</methodname>() method returns 
the second child of the paned widget.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkpaned--accept-position">
      <title>The "accept-position" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "accept-position" signal is emitted when
<parameter>paned</parameter> has the focus and any of the
<keycap>Return</keycap>, <keycap>Enter</keycap>, <keycap>Space</keycap> keys
are pressed. This will also cause the child widget with the focus to be
activated.</para>

    </refsect2>

    <refsect2 id="signal-gtkpaned--cancel-position">
      <title>The "cancel-position" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "cancel-position" signal is emitted when the
<keycap>Esc</keycap> key is pressed while <parameter>paned</parameter> has
the focus.</para>

    </refsect2>

    <refsect2 id="signal-gtkpaned--cycle-child-focus">
      <title>The "cycle-child-focus" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>reversed</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>reversed</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the focus cycle
direction should be reversed</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "cycle-child-focus" signal is emitted when
<keycap>F6</keycap> or <keycombo
action="simul"><keycap>Shift</keycap><keycap>F6</keycap> </keycombo> is
pressed while <parameter>paned</parameter> has the focus.</para>

    </refsect2>

    <refsect2 id="signal-gtkpaned--cycle-handle-focus">
      <title>The "cycle-handle-focus" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>reversed</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>reversed</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the focus cycle
direction should be reversed</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "cycle-handle-focus" signal is emitted when
<parameter>paned</parameter> has the focus and any of the
<keycap>Tab</keycap>,
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>Tab</keycap>
	</keycombo>, <keycombo action="simul"><keycap>Shift</keycap><keycap>Tab</keycap>
	</keycombo> or
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>Tab</keycap>
	</keycombo>  keys combinations are pressed. <keycap>Tab</keycap> and
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>Tab</keycap>
	</keycombo> set <parameter>reversed</parameter> to
<literal>False</literal> while
<keycombo action="simul"><keycap>Shift</keycap><keycap>Tab</keycap>
	</keycombo> and <keycombo action="simul"><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>Tab</keycap>
	</keycombo> set <parameter>reversed</parameter> to
<literal>True</literal>.</para>

    </refsect2>

    <refsect2 id="signal-gtkpaned--move-handle">
      <title>The "move-handle" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>scrolltype</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>scrolltype</parameter>&nbsp;:</term>
	  <listitem><simpara>the scroll type:
<literal>gtk.SCROLL_NONE</literal>, <literal>gtk.SCROLL_JUMP</literal>,
<literal>gtk.SCROLL_STEP_BACKWARD</literal>,
<literal>gtk.SCROLL_STEP_FORWARD</literal>,
<literal>gtk.SCROLL_PAGE_BACKWARD</literal>,
<literal>gtk.SCROLL_PAGE_FORWARD</literal>,
<literal>gtk.SCROLL_STEP_UP</literal>,
<literal>gtk.SCROLL_STEP_DOWN</literal>,
<literal>gtk.SCROLL_PAGE_UP</literal>,
<literal>gtk.SCROLL_PAGE_DOWN</literal>,
<literal>gtk.SCROLL_STEP_LEFT</literal>,
<literal>gtk.SCROLL_STEP_RIGHT</literal>,
<literal>gtk.SCROLL_PAGE_LEFT</literal>,
<literal>gtk.SCROLL_PAGE_RIGHT</literal>,
<literal>gtk.SCROLL_START</literal> or
<literal>gtk.SCROLL_END</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "move-handle" signal is emitted when
<parameter>paned</parameter> has the focus and one of the following key
combinations is pressed to move the separator:</para>

      <itemizedlist>
	<listitem>
	  <simpara><keycombo><keycap>Left
Arrow</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Right
Arrow</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Up Arrow</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Down
Arrow</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Page Up</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Page Down</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>Home</keycap></keycombo></simpara>
	</listitem>
	<listitem>
	  <simpara><keycombo><keycap>End</keycap></keycombo></simpara>
	</listitem>
      </itemizedlist>

      <para>The value of <parameter>scrolltype</parameter> is one of:
<literal>gtk.SCROLL_NONE</literal>, <literal>gtk.SCROLL_JUMP</literal>,
<literal>gtk.SCROLL_STEP_BACKWARD</literal>,
<literal>gtk.SCROLL_STEP_FORWARD</literal>,
<literal>gtk.SCROLL_PAGE_BACKWARD</literal>,
<literal>gtk.SCROLL_PAGE_FORWARD</literal>,
<literal>gtk.SCROLL_STEP_UP</literal>,
<literal>gtk.SCROLL_STEP_DOWN</literal>,
<literal>gtk.SCROLL_PAGE_UP</literal>,
<literal>gtk.SCROLL_PAGE_DOWN</literal>,
<literal>gtk.SCROLL_STEP_LEFT</literal>,
<literal>gtk.SCROLL_STEP_RIGHT</literal>,
<literal>gtk.SCROLL_PAGE_LEFT</literal>,
<literal>gtk.SCROLL_PAGE_RIGHT</literal>,
<literal>gtk.SCROLL_START</literal> or <literal>gtk.SCROLL_END</literal>.
The default handler for this signal moves the separator if the separator has
the focus.</para>

    </refsect2>

    <refsect2 id="signal-gtkpaned--toggle-handle-focus">
      <title>The "toggle-handle-focus" gtk.Paned Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>paned</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>paned</parameter>&nbsp;:</term>
	  <listitem><simpara>the paned that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the signal was
handled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "toggle-handle-focus" signal is emitted when
<parameter>paned</parameter> has the focus and <keycap>F8</keycap> is
pressed to give the focus to or take the focus from the separator
handle.</para>

    </refsect2>

  </refsect1>

</refentry>