summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gtklabel.xml
blob: 72272ee0144d19af25e8edb18281668ecc4fdd86 (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
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
<?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-gtklabel">
  <refnamediv>
    <refname>gtk.Label</refname>
    <refpurpose>a widget that displays a limited amount of read-only
text</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.Label</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkmisc">gtk.Misc</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtklabel">gtk.Label</link></methodname>
	<methodparam><parameter
		       role="keyword">str</parameter><initializer>None</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-text">set_text</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-text">get_text</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-attributes">set_attributes</link></methodname>
	<methodparam><parameter
		       role="keyword">attrs</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-attributes">get_attributes</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-label">set_label</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-label">get_label</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-markup">set_markup</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-use-markup">set_use_markup</link></methodname>
	<methodparam><parameter
		       role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-use-markup">get_use_markup</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-use-underline">set_use_underline</link></methodname>
	<methodparam><parameter
		       role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-use-underline">get_use_underline</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-markup-with-mnemonic">set_markup_with_mnemonic</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-mnemonic-keyval">get_mnemonic_keyval</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-mnemonic-widget">set_mnemonic_widget</link></methodname>
	<methodparam><parameter
		       role="keyword">widget</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-mnemonic-widget">get_mnemonic_widget</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-text-with-mnemonic">set_text_with_mnemonic</link></methodname>
	<methodparam><parameter role="keyword">str</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-justify">set_justify</link></methodname>
	<methodparam><parameter
		       role="keyword">jtype</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-justify">get_justify</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-pattern">set_pattern</link></methodname>
	<methodparam><parameter
		       role="keyword">pattern</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-line-wrap">set_line_wrap</link></methodname>
	<methodparam><parameter
		       role="keyword">wrap</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-line-wrap">get_line_wrap</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-selectable">set_selectable</link></methodname>
	<methodparam><parameter
		       role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-selectable">get_selectable</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--select-region">select_region</link></methodname>
	<methodparam><parameter
		       role="keyword">start_offset</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">end_offset</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-selection-bounds">get_selection_bounds</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-layout">get_layout</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-layout-offsets">get_layout_offsets</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-ellipsize">set_ellipsize</link></methodname>
	<methodparam><parameter
		       role="keyword">mode</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-ellipsize">get_ellipsize</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-width-chars">set_width_chars</link></methodname>
	<methodparam><parameter
		       role="keyword">n_chars</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-width-chars">get_width_chars</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-single-line-mode">set_single_line_mode</link></methodname>
	<methodparam><parameter
		       role="keyword">single_line_mode</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-single-line-mode">get_single_line_mode</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-single-line-mode">get_max_width_chars</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-single-line-mode">set_max_width_chars</link></methodname>
	<methodparam><parameter
		       role="keyword">n_chars</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--get-angle">get_angle</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtklabel--set-angle">set_angle</link></methodname>
	<methodparam><parameter
		       role="keyword">angle</parameter></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-gtkmisc">gtk.Misc</link>
        +-- <link linkend="class-gtklabel">gtk.Label</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtklabel">
    <title>gtk.Label 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-gtkmisc">gtk.Misc 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>"angle"</entry>
	      <entry>Read-Write</entry>
	      <entry>The angle that the baseline of the label makes with the
horizontal, in degrees, measured counterclockwise. An angle of 90 reads from
from bottom to top, an angle of 270, from top to bottom. Ignored if the label
is selectable, wrapped, or ellipsized. Allowed values: [0,360]
Default value: 0. Available in GTK+ 2.6 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"attributes"</entry>
	      <entry>Read-Write</entry>
	      <entry>A list of Pango style attributes to apply to the text
of the label.</entry>
	    </row>

	    <row valign="top">
	      <entry>"cursor-position"</entry>
	      <entry>Read</entry>
	      <entry>The current position of the insertion cursor in
chars. Allowed values: >= 0. Default value: 0</entry>
	    </row>

	    <row valign="top">
	      <entry>"ellipsize"</entry>
	      <entry>Read-Write</entry>

	      <entry>The preferred place to ellipsize the string, if the
label does not have enough room to display the entire string, specified as
one of the <xref linkend="pango-ellipsize-mode-constants"
endterm="pango-ellipsize-mode-constants-title"></xref>. Note that setting
this property to a value other than <literal>pango.ELLIPSIZE_NONE</literal>
has the side-effect that the label requests only enough space to display the
ellipsis "...". In particular, this means that ellipsizing labels don't work
well in notebook tabs, unless the tab's "tab-expand" property is set to
<literal>True</literal>. Other means to set a label's width are with the
<link
linkend="method-gtkwidget--set-size-request"><methodname>gtk.Widget.set_size_request</methodname>()</link>
and <link
linkend="method-gtklabel--set-width-chars"><methodname>set_width_chars</methodname>()</link>
methods. Default value: <literal>pango.ELLIPSIZE_NONE</literal>. Available
in GTK+ 2.6 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"justify"</entry>
	      <entry>Read-Write</entry>
	      <entry>The alignment of the lines in the text of the label
relative to each other. The possible values are:
<literal>gtk.JUSTIFY_LEFT</literal>, <literal>gtk.JUSTIFY_RIGHT</literal>,
<literal>gtk.JUSTIFY_CENTER</literal>, <literal>gtk.JUSTIFY_FILL</literal>.
This does NOT affect the alignment of the label within its
allocation. Default value: <literal>gtk.JUSTIFY_LEFT</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"label"</entry>
	      <entry>Read-Write</entry>
	      <entry>The text of the label. Default value:
<literal>None</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"max-width-chars"</entry>
	      <entry>Read-Write</entry>
	      <entry>The desired maximum width of the label, in characters.
If this property is set to -1, the width will be calculated automatically,
otherwise the label will request space for no more than the requested number
of characters. If the "width-chars" property is set to a positive value, then
the "max-width-chars" property is ignored. Allowed values: >= -1.
Default value: -1. Available in GTK+ 2.6 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"mnemonic-keyval"</entry>
	      <entry>Read</entry>
	      <entry>The mnemonic accelerator key for this label. Default
value: 16777215</entry>
	    </row>

	    <row valign="top">
	      <entry>"mnemonic-widget"</entry>
	      <entry>Read-Write</entry>
	      <entry>The widget to be activated when the label's mnemonic
key is pressed.</entry>
	    </row>

	    <row valign="top">
	      <entry>"pattern"</entry>
	      <entry>Write</entry>
	      <entry>A string with _ characters in positions used to
identify to characters in the text to underline. Default value:
<literal>None</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"selectable"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the label text can be
selected with the mouse. Default value: <literal>False</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"selection-bound"</entry>
	      <entry>Read</entry>
	      <entry>The position of the opposite end of the selection from
the cursor in chars. Allowed values: >= 0. Default value: 0.</entry>
	    </row>

	    <row valign="top">
	      <entry>"single-line-mode"</entry>
	      <entry>Read-Write</entry>

	      <entry>If <literal>True</literal> the label is in single line
mode. In single line mode, the height of the label does not depend on the
actual text, it is always set to ascent + descent of the font. This can be
an advantage in situations where resizing the label because of text changes
would be distracting, e.g. in a statusbar. Default value:
<literal>False</literal>. Available in GTK+ 2.6 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"use-markup"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the text of the label
includes XML markup. Default value: <literal>False</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"use-underline"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, an underscore in the text
indicates the next character should be used for the mnemonic accelerator
key. Default value: <literal>False</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"width-chars"</entry>
	      <entry>Read-Write</entry>

	      <entry>The desired width of the label, in characters. If this
property is set to -1, the width will be calculated automatically, otherwise
the label will request either 3 characters or the property value, whichever
is greater. Allowed values: >= -1. Default value: -1. Available in GTK+
2.6 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"wrap"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, wrap lines if the text
becomes too wide. Default value: <literal>False</literal></entry>
	    </row>

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

  </refsect1>

  <refsect1 id="style-properties-gtklabel">
    <title>gtk.Label Style Properties</title>

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

  </refsect1>

  <refsect1 id="signal-prototypes-gtklabel">
    <title>gtk.Label 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>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtklabel--copy-clipboard">copy-clipboard</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>label</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtklabel--move-cursor">move-cursor</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>label</parameter>
            </methodparam>
            <methodparam><parameter>step</parameter>
            </methodparam>
            <methodparam><parameter>count</parameter>
            </methodparam>
            <methodparam><parameter>extend_selection</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtklabel--populate-popup">populate-popup</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>label</parameter>
            </methodparam>
            <methodparam><parameter>menu</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link> is a widget
class that displays a limited amount of read-only text. Labels are used by
several widgets (e.g. <link
linkend="class-gtkbutton"><classname>gtk.Button</classname></link>, and its
subclasses, <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>,
etc.) to provide text display as well as by applications to display
messages, etc, to the user. Most of the functionality of a <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link> is directed
at modifying the style and layout of the text within the widget allocation.
A <link linkend="class-gtklabel"><classname>gtk.Label</classname></link> is
a "windowless" object which means that it cannot receive events directly. A
<link linkend="class-gtkeventbox"><classname>gtk.EventBox</classname></link>
can be used to provide event handling capabilities to a <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link> widget if
needed.</para>

    <refsect2>
      <title>Mnemonics</title>

      <para>Label text may be specified with embedded underscore characters
that are used to indicate that the following character should be underlined
and used as the mnemonic accelerator (if it's the first underlined
character). The <link
linkend="method-gtklabel--set-text-with-mnemonic"><methodname>set_text_with_mnemonic</methodname>()</link>
method is used to parse the label text for a mnemonic characters. Mnemonics
automatically activate any activatable widget the label is inside, such as a
<link linkend="class-gtkbutton"><classname>gtk.Button</classname></link>; if
the label is not inside an activatable widget, you have to tell the label
about the target using the <link
linkend="method-gtklabel--set-mnemonic-widget"><methodname>set_mnemonic_widget</methodname>()</link>
method. Here's a simple example where the label is inside a button:</para>

      <programlisting>
  # Pressing Alt+H will activate this button
  button = gtk.Button()
  label = gtk.Label("_Hello")
  label.set_use_underline(True)
  button.add(label)
</programlisting>

      <para>As a convenience you can create a button with a mnemonic label
as follows:</para>

      <programlisting>
  # Pressing Alt+H will activate this button
  button = gtk.Button(label="_Hello", use_underline=True)
</programlisting>

      <para>To create a mnemonic for a widget alongside the label, such as a
<link linkend="class-gtkentry"><classname>gtk.Entry</classname></link>, you
have to point the label at the entry with the <link
linkend="method-gtklabel--set-mnemonic-widget"><methodname>set_mnemonic_widget</methodname>()</link>
method:</para>

      <programlisting>
  # Pressing Alt+H will focus the entry
  entry = gtk.Entry()
  label = gtk.Label("_Hello")
  label.set_use_underline(True)
  label.set_mnemonic_widget(entry)
</programlisting>

    </refsect2>

    <refsect2>
      <title>Markup (styled text)</title>

    <para>To make it easy to format text in a label (changing colors, fonts,
etc.), the label text can be provided in the <link
linkend="pango-markup-language">Pango markup format</link> which is a simple
XML markup format. The <link
linkend="method-gtklabel--set-markup"><methodname>gtk.Label.set_markup</methodname>()</link>
method sets the label using text in valid markup format (e.g. '&lt;', '&gt;'
and '&amp;' characters must be replaced by &amp;lt;, &amp;gt; and &amp;amp;
respectively. For example:</para>

      <programlisting>
  label = gtk.Label()
  label.set_markup("&lt;small&gt;Small text&lt;/small&gt;");
</programlisting>

      <para>The markup passed to the <link
linkend="method-gtklabel--set-markup"><methodname>set_markup</methodname>()</link>
method must be valid. For example, the literal &lt;&gt;&amp; characters must
be escaped as &amp;lt;, &amp;gt;, and &amp;amp;. If you pass text obtained
from the user, file, or a network to the <link
linkend="method-gtklabel--set-markup"><methodname>set_markup</methodname>()</link>
method, you'll want to escape it with the Python Library
<function>xml.sax.saxutils.escape</function>() function.</para>

      <para>Markup strings are just a convenient way to set the <link
linkend="class-pangoattrlist"><classname>pango.AttrList</classname></link>
on a label. Using the <link
linkend="method-gtklabel--set-attributes"><methodname>set_attributes</methodname>()</link>
method may be a simpler way to set attributes in some cases. Be careful
though; <link
linkend="class-pangoattrlist"><classname>pango.AttrList</classname></link>
tends to cause internationalization problems, unless you're applying
attributes to the entire string because specifying the start_index and
end_index for a <link
linkend="class-pangoattribute"><classname>pango.Attribute</classname></link>
requires knowledge of the exact string being displayed, so translations will
cause problems.</para>

    </refsect2>

    <refsect2>
      <title>Selectable labels</title>

      <para>Labels can be made selectable with the <link
linkend="method-gtklabel--set-selectable"><methodname>set_selectable</methodname>()</link>
method. Selectable labels allow the user to copy the label contents to the
clipboard. Only labels that contain useful-to-copy information such as error
messages should be made selectable.</para>

    </refsect2>

    <refsect2>
      <title>Text layout</title>

      <para>A label can contain any number of paragraphs, but will have
performance problems if it contains more than a small number. Paragraphs are
separated by newlines or other paragraph separators understood by
Pango.</para>

      <para>Labels can automatically wrap text if you call the <link
linkend="method-gtklabel--set-line-wrap"><methodname>set_line_wrap</methodname>()</link>
method.</para>

      <para>The <link
linkend="method-gtklabel--set-justify"><methodname>set_justify</methodname>()</link>
method sets how the lines in a label align with one another. If you want to
set how the label as a whole aligns in its available space, see the <link
linkend="method-gtkmisc--set-alignment"><methodname>gtk.Misc.set_alignment</methodname>()</link>
method.</para>

    </refsect2>

  </refsect1>

  <refsect1 id="constructor-gtklabel">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.Label</methodname>
	<methodparam><parameter
		       role="keyword">str</parameter><initializer>None</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">str</parameter>&nbsp;:</term>
	<listitem><simpara>The text of the label or <literal>None</literal>
for a blank label</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>the new <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link>
widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link> with the
text specified by <parameter>str</parameter> inside it. You can pass
<literal>None</literal> to get a blank label.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtklabel--set-text">
      <title>gtk.Label.set_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_text</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>The new text for the
label.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_text</methodname>() method sets the text
within the <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link> widget.  It
replaces any text that was there before and will clear any previously set
mnemonic accelerators.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-text">
      <title>gtk.Label.get_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_text</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the text in the label
widget.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_text</methodname>() method fetches the text
from a label widget, as displayed on the screen. This does not include any
Pango markup or embedded underscore characters indicating mnemonics. (See
<link
linkend="method-gtklabel--get-label"><methodname>get_label</methodname>()</link>).</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-attributes">
      <title>gtk.Label.set_attributes</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_attributes</methodname>
	  <methodparam><parameter
			 role="keyword">attrs</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">attrs</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-pangoattrlist"><classname>pango.AttrList</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_attributes</methodname>() method applies a
<link
linkend="class-pangoattrlist"><classname>pango.AttrList</classname></link>
list of attributes to the label text. The attributes set with this function
will be ignored if either the "use-underline" or "use-markup" attributes is
<literal>True</literal>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-attributes">
      <title>gtk.Label.get_attributes</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_attributes</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the attribute list, or <literal>None</literal>
if no attributes were set.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_attributes</methodname>() method returns the
attribute list that was set on the label using <link
linkend="method-gtklabel--set-attributes"><methodname>set_attributes</methodname>()</link>, 
if any. This function does not reflect attributes that come from the labels
markup (see <link
linkend="method-gtklabel--set-markup"><methodname>set_markup</methodname>()</link>).</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-label">
      <title>gtk.Label.set_label</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_label</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>the new text (including mnemonics or markup) to
set for the label</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_label</methodname>() method sets the text of
the label. The label is parsed for embedded underscores and Pango markup
depending on the values of the "use-underline" and "use-markup"
properties.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-label">
      <title>gtk.Label.get_label</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_label</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the text of the label
widget.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_label</methodname>() method returns the text
from a label widget including any Pango markup and embedded underscores
indicating mnemonics. (See <link
linkend="method-gtklabel--get-text"><methodname>get_text</methodname>()</link> 
that just returns the text).</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-markup">
      <title>gtk.Label.set_markup</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_markup</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>a markup string</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_markup</methodname>() method parses
<parameter>str</parameter>, which is marked up with the Pango text markup
language, and sets the label's text and attribute list.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-use-markup">
      <title>gtk.Label.set_use_markup</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_use_markup</methodname>
	  <methodparam><parameter
			 role="keyword">setting</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the label's text
should be parsed for markup.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_use_markup</methodname>() method sets the
"use-markup" property to the value of <parameter>setting</parameter>. If
<literal>True</literal> the text of the label should be parsed as
markup.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-use-markup">
      <title>gtk.Label.get_use_markup</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_use_markup</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the label's text
will be parsed for markup.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_user_markup</methodname>() method returns
the value of the "use-markup" property. If <literal>True</literal> the
label's text is parsed as markup. See <link
linkend="method-gtklabel--set-use-markup"><methodname>set_use_markup</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-use-underline">
      <title>gtk.Label.set_use_underline</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_use_underline</methodname>
	  <methodparam><parameter
			 role="keyword">setting</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> underscores in the
text indicate mnemonics</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_use_underline</methodname>() method sets the
"use-underline" property to the value of <parameter>setting</parameter>. If
<parameter>setting</parameter> is <literal>True</literal>, an underscore in
the text indicates the next character should be used for the mnemonic
accelerator key.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-use-underline">
      <title>gtk.Label.get_use_underline</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_use_underline</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if an embedded
underscore in the label indicates the mnemonic
accelerator.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_use_underline</methodname>() method returns
the value of the "use-underline" property. If <literal>True</literal> an
embedded underscore in the label indicates the next character is a mnemonic.
See <link
linkend="method-gtklabel--set-use-underline"><methodname>set_use_underline</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-markup-with-mnemonic">
      <title>gtk.Label.set_markup_with_mnemonic</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_markup_with_mnemonic</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>a markup string including embedded
underscores</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_markup_with_mnemonic</methodname>() method
parses <parameter>str</parameter> as markup, setting the label's text and
attribute list based on the parse results. If characters in
<parameter>str</parameter> are preceded by an underscore, they are
underlined indicating that they represent a mnemonic accelerator. The
mnemonic key can be used to activate another widget, chosen automatically,
or explicitly using the <link
linkend="method-gtklabel--set-mnemonic-widget"><methodname>set_mnemonic_widget</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-mnemonic-keyval">
      <title>gtk.Label.get_mnemonic_keyval</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_mnemonic_keyval</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a keyval, or the void symbol
keyval</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_mnemonic_keyval</methodname>() method
returns the value of the "mnemonic-keyval" property that contains the keyval
used for the mnemonic accelerator if one has been set on the label. If there
is no mnemonic set up it returns the void symbol keyval.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-mnemonic-widget">
      <title>gtk.Label.set_mnemonic_widget</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_mnemonic_widget</methodname>
	  <methodparam><parameter
			 role="keyword">widget</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">widget</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to be activated when the mnemonic is
pressed</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_mnemonic_widget</methodname>() method sets
the "mnemonic-widget" property using the value of
<parameter>widget</parameter>. This method associates the label mnemonic
with a widget that will be activated when the mnemonic accelerator is
pressed. When the label is inside a widget (like a <link
linkend="class-gtkbutton"><classname>gtk.Button</classname></link> or a
<link linkend="class-gtknotebook"><classname>gtk.Notebook</classname></link>
tab) it is automatically associated with the correct widget, but sometimes
(i.e. when the target is a <link
linkend="class-gtkentry"><classname>gtk.Entry</classname></link> next to the
label) you need to set it explicitly using this function. The target widget
will be activated by emitting "mnemonic_activate" on it.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-mnemonic-widget">
      <title>gtk.Label.get_mnemonic_widget</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_mnemonic_widget</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the target of the label's mnemonic, or
<literal>None</literal> if none has been set and the default algorithm will
be used.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_mnemonic_widget</methodname>() method
retrieves the value of the "mnemonic-widget" property which is the target of
the mnemonic accelerator of this label. See <link
linkend="method-gtklabel--set-mnemonic-widget"><methodname>set_mnemonic_widget</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-text-with-mnemonic">
      <title>gtk.Label.set_text_with_mnemonic</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_text_with_mnemonic</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>the label text with embedded underscore
characters indicating the mnemonic characters</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_text_with_mnemonic</methodname>() method
sets the label's text from the string <parameter>str</parameter>. If
characters in <parameter>str</parameter> are preceded by an underscore, they
are underlined indicating that they represent a mnemonic accelerator. The
mnemonic key can be used to activate another widget, chosen automatically,
or explicitly using the <link
linkend="method-gtklabel--set-mnemonic-widget"><methodname>set_mnemonic_widget</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-justify">
      <title>gtk.Label.set_justify</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_justify</methodname>
	  <methodparam><parameter
			 role="keyword">jtype</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">jtype</parameter>&nbsp;:</term>
	  <listitem><simpara>justification type</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_justify</methodname>() method sets the
alignment of the lines in the text of the label relative to each other using
the value of <parameter>jtype</parameter>. The possible values of
<parameter>jtype</parameter> are: <literal>gtk.JUSTIFY_LEFT</literal>,
<literal>gtk.JUSTIFY_RIGHT</literal>, <literal>gtk.JUSTIFY_CENTER</literal>
and <literal>gtk.JUSTIFY_FILL</literal>. <literal>gtk.JUSTIFY_LEFT</literal>
is the default value when the widget is first created. If you want to set
the alignment of the label as a whole, use the <link
linkend="method-gtkmisc--set-alignment"><methodname>gtk.Misc.set_alignment</methodname>()</link> 
method instead. The <link
linkend="method-gtklabel--set-justify"><methodname>set_justify</methodname>()</link> 
has no effect on labels containing only a single line.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-justify">
      <title>gtk.Label.get_justify</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_justify</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the label justification</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_justify</methodname>() method returns the
justification of the label; one of: <literal>gtk.JUSTIFY_LEFT</literal>,
<literal>gtk.JUSTIFY_RIGHT</literal>, <literal>gtk.JUSTIFY_CENTER</literal>
or <literal>gtk.JUSTIFY_FILL</literal>. See <link
linkend="method-gtklabel--set-justify"><methodname>set_justify</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-pattern">
      <title>gtk.Label.set_pattern</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_pattern</methodname>
	  <methodparam><parameter
			 role="keyword">pattern</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">pattern</parameter>&nbsp;:</term>
	  <listitem><simpara>the pattern of underlines</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_pattern</methodname>() method sets the
"pattern" property with the value of <parameter>pattern</parameter>. The
pattern contains an underscore or space for each character in the label
text. Any characters omitted are assumed to be spaces. For example, if the
label text is "XXX Label" and the pattern is "___" then only the "XXX" will
be underlined.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-line-wrap">
      <title>gtk.Label.set_line_wrap</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_line_wrap</methodname>
	  <methodparam><parameter
			 role="keyword">wrap</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">wrap</parameter>&nbsp;:</term>
	  <listitem><simpara>if True the label lines will wrap if too big
for the widget size.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_wrap</methodname>() method sets the "wrap"
property tot he value of <parameter>wrap</parameter>. If
<parameter>wrap</parameter> is <literal>True</literal> the label text will
wrap if it is wider than the widget size; otherwise, the text gets cut off
at the edge of the widget.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-line-wrap">
      <title>gtk.Label.get_line_wrap</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_line_wrap</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the lines of the
label are automatically wrapped.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_line_wrap</methodname>() method returns the
value of the "wrap" property. If "wrap" is <literal>True</literal> the lines
in the label are automatically wrapped. See <link
linkend="method-gtklabel--set-line-wrap"><methodname>set_line_wrap</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-selectable">
      <title>gtk.Label.set_selectable</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_selectable</methodname>
	  <methodparam><parameter
			 role="keyword">setting</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> allow the text in
the label to be selected</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_selectable</methodname>() method sets the
"selectable" property with the value of <parameter>setting</parameter>. If
<parameter>setting</parameter> is <literal>True</literal> the user is
allowed to select text from the label, for copy-and-paste.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-selectable">
      <title>gtk.Label.get_selectable</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_selectable</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the user can select
the label text</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_selectable</methodname>() method gets the
value of the "selectable" property set by the <link
linkend="method-gtklabel--set-selectable"><methodname>set_selectable</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--select-region">
      <title>gtk.Label.select_region</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>select_region</methodname>
	  <methodparam><parameter
			 role="keyword">start_offset</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end_offset</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">start_offset</parameter>&nbsp;:</term>
	  <listitem><simpara>start offset in characters</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">end_offset</parameter>&nbsp;:</term>
	  <listitem><simpara>end offset in characters</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>select_region</methodname>() method selects a
range of characters in the label, if the label is selectable. The selected
region is the range of characters between
<parameter>start_offset</parameter> and <parameter>end_offset</parameter>.
See <link
linkend="method-gtklabel--set-selectable"><methodname>set_selectable</methodname>()</link>. 
If the label is not selectable, this method has no effect. If
<parameter>start_offset</parameter> or <parameter>end_offset</parameter> are
-1, then the end of the label will be substituted.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-selection-bounds">
      <title>gtk.Label.get_selection_bounds</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_selection_bounds</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing the start and end character
offsets of the selection</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_selection_bounds</methodname>() method
returns a tuple that contains the start and end character offsets of the
selected text in the label if the selection exists. If there is no selection
or the label is not selectable, an empty tuple is returned.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-layout">
      <title>gtk.Label.get_layout</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_layout</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-pangolayout"><classname>pango.Layout</classname></link> for
this label</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_layout</methodname>() method returns the
<link linkend="class-pangolayout"><classname>pango.Layout</classname></link>
used to display the label. The layout is useful to e.g. convert text
positions to pixel positions, in combination with <link
linkend="method-gtklabel--get-layout-offsets"><methodname>get_layout_offsets</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-layout-offsets">
      <title>gtk.Label.get_layout_offsets</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_layout_offsets</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing the  X offset of the layout,
or <literal>None</literal> and the Y offset of layout, or
<literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_layout_offsets</methodname>() method returns
a tuple containing the coordinates where the label will draw the <link
linkend="class-pangolayout"><classname>pango.Layout</classname></link>
representing the text in the label. This method is useful for converting
mouse events into coordinates inside the <link
linkend="class-pangolayout"><classname>pango.Layout</classname></link>, e.g.
to take some action if some part of the label is clicked. Of course you will
need to create a <link
linkend="class-gtkeventbox"><classname>gtk.EventBox</classname></link> to
receive the events, and pack the label inside it, since labels are a
"windowless" (<literal>gtk.NO_WINDOW</literal>) widget. Remember when using
the <link
linkend="class-pangolayout"><classname>pango.Layout</classname></link>
functions you need to convert to and from pixels using
<function>pango.PIXELS()</function> or
<literal>pango.SCALE</literal>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-ellipsize">
      <title>gtk.Label.set_ellipsize</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_ellipsize</methodname>
	  <methodparam><parameter
			 role="keyword">mode</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mode</parameter>&nbsp;:</term>
	  <listitem><simpara>one of the <xref
	  linkend="pango-ellipsize-mode-constants"
	  endterm="pango-ellipsize-mode-constants-title"></xref> to
	  use</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>set_ellipsize</methodname>() method sets the
"ellipsize" property to the value of
<parameter>mode</parameter>. <parameter>mode</parameter> should be one of
the <xref linkend="pango-ellipsize-mode-constants"
endterm="pango-ellipsize-mode-constants-title"></xref>. The "ellipsize"
property specifies if and where an ellipse should be used if there is not
enough room for the label text.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-ellipsize">
      <title>gtk.Label.get_ellipsize</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_ellipsize</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the current ellipsize mode</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_ellipsize</methodname>() method returns the
value of the "ellipsize" property which contains one of the <xref
linkend="pango-ellipsize-mode-constants"
endterm="pango-ellipsize-mode-constants-title"></xref>. The "ellipsize"
property specifies if and where an ellipse should be used if there is not
enough room for the label text.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-width-chars">
      <title>gtk.Label.set_width_chars</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_width_chars</methodname>
	  <methodparam><parameter
			 role="keyword">n_chars</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">n_chars</parameter>&nbsp;:</term>
	  <listitem><simpara> the new desired width, in
characters.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>set_width_chars</methodname>() method sets the
"width-chars" property to the value of <parameter>n_chars</parameter>. The
"width-chars" property specifies the desired width of the label in
characters.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-width-chars">
      <title>gtk.Label.get_width_chars</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_width_chars</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the desired width of the label in
characters.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_width_chars</methodname>() method returns
the value of the "width-chars" property that specifies the desired width of
the label in characters.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-single-line-mode">
      <title>gtk.Label.set_single_line_mode</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_single_line_mode</methodname>
	  <methodparam><parameter
			 role="keyword">single_line_mode</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">single_line_mode</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the label is in
single line mode.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>set_single_line_mode</methodname>() method sets
the "single-line-mode" property to the value of
<parameter>single_line_mode</parameter>. If
<parameter>single_line_mode</parameter> is <literal>True</literal> the label
is in single line mode where the height of the label does not depend on the
actual text, it is always set to ascent + descent of the font.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-single-line-mode">
      <title>gtk.Label.get_single_line_mode</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_single_line_mode</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara></simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_single_line_mode</methodname>() method
returns the value of the "single-line-mode" property. See the <link
linkend="method-gtklabel--set-single-line-mode"><methodname>set_single_line_mode</methodname>()</link>
method for more information.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-max-width-chars">
      <title>gtk.Label.set_max_width_chars</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_max_width_chars</methodname>
	  <methodparam><parameter
			 role="keyword">n_chars</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">n_chars</parameter>&nbsp;:</term>
	  <listitem><simpara> the new desired maximum width, in
characters.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>set_max_width_chars</methodname>() method sets
the "max-width-chars" property to the value of
<parameter>n_chars</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-max-width-chars">
      <title>gtk.Label.get_max_width_chars</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_max_width_chars</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara></simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_max_width_chars</methodname>() method
returns the value of the "max-width-chars" property which is the desired
maximum width of the label in characters.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--set-angle">
      <title>gtk.Label.set_angle</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_angle</methodname>
	  <methodparam><parameter
			 role="keyword">angle</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">angle</parameter>&nbsp;:</term>
	  <listitem><simpara> the angle that the baseline of the label makes
with the horizontal, in degrees, measured counterclockwise</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>set_angle</methodname>() method sets the "angle"
property to the value of
<parameter>angle</parameter>. <parameter>angle</parameter> is the angle of
rotation for the label. An angle of 90 reads from from bottom to top, an
angle of 270, from top to bottom. The angle setting for the label is ignored
if the label is selectable, wrapped, or ellipsized.</para>

    </refsect2>

    <refsect2 id="method-gtklabel--get-angle">
      <title>gtk.Label.get_angle</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_angle</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara></simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_angle</methodname>() method returns the
value of the "angle" property. See the <link
linkend="method-gtklabel--set-angle"><methodname>set_angle</methodname>()</link>
method for more information.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtklabel--copy-clipboard">
      <title>The "copy-clipboard" gtk.Label Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>label</parameter>&nbsp;:</term>
	  <listitem><simpara>the label 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>
      </variablelist>

      <para>The "copy-clipboard" signal is emitted when text is copied from
the label to the clipboard.</para>

    </refsect2>

    <refsect2 id="signal-gtklabel--move-cursor">
      <title>The "move-cursor" gtk.Label Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>label</parameter></methodparam>
	  <methodparam><parameter>step</parameter></methodparam>
	  <methodparam><parameter>count</parameter></methodparam>
	  <methodparam><parameter>extend_selection</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>label</parameter>&nbsp;:</term>
	  <listitem><simpara>the label that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>step</parameter>&nbsp;:</term>
	  <listitem><simpara>the step size of the move:
<literal>gtk.MOVEMENT_LOGICAL_POSITIONS</literal>,
<literal>gtk.MOVEMENT_VISUAL_POSITIONS</literal>,
<literal>gtk.MOVEMENT_WORDS</literal>,
<literal>gtk.MOVEMENT_DISPLAY_LINES</literal>,
<literal>gtk.MOVEMENT_DISPLAY_LINE_ENDS</literal>,
<literal>gtk.MOVEMENT_PARAGRAPHS</literal>,
<literal>gtk.MOVEMENT_PARAGRAPH_ENDS</literal>,
<literal>gtk.MOVEMENT_PAGES</literal> and
<literal>gtk.MOVEMENT_BUFFER_ENDS</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>count</parameter>&nbsp;:</term>
	  <listitem><simpara>the number of steps to
take</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>extend_selection</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> extend the range of
	  the selection</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>
      </variablelist>

      <para>The "move-cursor" signal is emitted when the cursor is being
moved <parameter>count</parameter> steps or size <literal>step</literal>.
The step size is one of:</para>

      <programlisting>
  gtk.MOVEMENT_LOGICAL_POSITIONS,    move by graphemes
  gtk.MOVEMENT_VISUAL_POSITIONS,     move by graphemes
  gtk.MOVEMENT_WORDS,                move by words
  gtk.MOVEMENT_DISPLAY_LINES,        move by lines(wrapped lines)
  gtk.MOVEMENT_DISPLAY_LINE_ENDS,    move to line ends(wrapped lines)
  gtk.MOVEMENT_PARAGRAPHS,           move by paragraphs(newline-ended lines)
  gtk.MOVEMENT_PARAGRAPH_ENDS,       move to ends of a paragraph
  gtk.MOVEMENT_PAGES,	             move by pages
  gtk.MOVEMENT_BUFFER_ENDS           move to ends of the buffer
</programlisting>

      <para>If <parameter>extend_selection</parameter> is
<literal>True</literal> the selection will be extended to include the text
moved over.</para>

    </refsect2>

    <refsect2 id="signal-gtklabel--populate-popup">
      <title>The "populate-popup" gtk.Label Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>label</parameter>&nbsp;:</term>
	  <listitem><simpara>the label that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>menu</parameter>&nbsp;:</term>
	  <listitem><simpara>the menu to be populated</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>
      </variablelist>

      <para>The "populate-popup" signal is emitted when a menu needs to be
populated on the fly.</para>

    </refsect2>

  </refsect1>

</refentry>