File: de.mo

package info (click to toggle)
gtkmm-documentation 4.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,772 kB
  • sloc: cpp: 15,541; javascript: 1,208; makefile: 1,080; python: 401; xml: 106; perl: 67; sh: 8
file content (2042 lines) | stat: -rw-r--r-- 128,558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
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
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042

0PARQAeAk
BdvBqBMCC~DEEFu#G]G[G%SHUyH2JLLM>xNAN`NIZOO:P.R1TtQUUYVWpX2YZ[UH\\&]S^3#_W__}`[apdaab>cdCdpdcRegeKfjfzg3|gQijkmlEl2Bm-umSmCmZ;nanUnqNo:ooAp$qHCqBq;q'r=3rPqr.r(r(sICs\ss3s1ttdw4w6yVz9{A|_||a
}o}~
7rrP+5|B`_EIHZF
UG`q]&4:*/-OF}\ċZ!=|R=
sK42+'hS$h+JvqnolG-ܓO
/Z4 ];>zH<Fؖ
(EQcr`~8ߗ	!+	CM
bp	|&ŘܘxhqNؙ2ޙ	".<6sz;-ϛ 5Lh
tʜ֜ߜ
(/Xoǝٝޝ9A
*8Gޟ
=W_}

Ǡՠ#8Lf{ơ!١*&&M\0d#$:ޢ>X^o
ǣ0ϣ	
'5PYew9Ȥ\ڤi7ECM+
yEJG7BB§-
3eAY9TqkwXج|ޭX[mAaY۱5
 \'BnL)/;Թ ˻3 1tRBǾ<
oGTSw`m6F}.
/'(#*)N4xC$$(oM!6.+Z,tSH0%y:16<[at|		7=CU
h
v~"(
= ^tG'
!"3
A
+,!NTZR[+1C]
p{3%Y)
5C
O
]k		!%7	FPfw"/L5=Edp

"9a
5@
Xf	~
Nb6r4	RKB=I	0NE	3{D9A
7L6c	N)9x@3D'2l[wsds	/Db	w
?Y8G/^
%9,yD9	+ D!e81-)W$f

1.4`)/7)S7}!3/7;3s

4-'Dl){:3- jo!?OU ]~PM19FS
!.
D+O.{	>,5
<GO^cho

4;"%^9a4 eU2i
t)

D>Bpt7x	x		)
3
C
L
'h



	


U
d+

0

Qgbd0qR9ekd^q5~|wu][%;Ua2!"#$>`%A%`%IB&&"'.(+t9,,A-.p.2l012U0334S536?66}r7[7pL889&::C;p;c:<g<K=R=z=3d>Q@@BUCEC2*D-]DSDCDZ#Ea~EUEq6F:FFAG$HH+HBtH;H'H=IPYI.I(I(JI+J\uJJ3JKKdmN4N6P>Q!RASGSSaSWTTU7VrVZWPX5dXXZ[BH\_]E]1^HH^^^4_
C_GN___`]a4raCa*a3b0JbL{bcbb,cCcUc>)drhd9d7e+Meyye+eyf*ffsdgpgIhshp]ii]jMj-2kR`k/k8klc;l9llLmnFnVnbnfnrnnnDnnno0o`<o(oo	o o	op p2p	>p1Hpzppp
ppLqUqRoqq8qr	rrrf%rsssHs1s%t!9t[tttt
ttttttu u)u>uSu`u$yu"uuuu
v v2v;vDv#avvvvywwwwwxxxxxdx)y&1y(Xy
y%yyy$yyz'z?zUztzzzzzz"{+){'U{}{{@{/{1
|I<|S|||3}6}I}h}w}}%}	}}
}}}~~%#~FI~~S~f~@]EM
2@?_DA<&<c4
ՁgkKւ߂ .Od{k<XD|X ymat֊Y
 ˌ\IB3vL~*˒;דɔ 3ė tB<љoT~SӚw'm6
Db0
3̝+ڞ118@jM%%:o`!Р6=G4٢XWPt'ţC	MV^q Ƥݤ#		6
MXl1ť˥إ
$-?Ts'4G"|6֧AXr^52J*
@3K/6G0M1~	ǭӭȮ
,B\y5¯Ȱ+԰


'5Tir
#00?F^vβֲ+8Oox
&	 δ
&),V_vb/
ȶ
%1׷>;+g|iIĹB
Q,\d
:һ
JAH1;zCrm]yL׾K$,pe1c5*{Zjw	
	<%Qw	Jko93?I-|N9$';UgH+:0A/Y&
3AI2b4)"-<j)5!1-:7h3

4%Z'q+:3(\ !n Pfn{-?Vc
y+.	>"aj
q|
".4=CG
4(;]%9a4[e2
=iE)
'
/D:>p@7x	fp'
	\dh<0
;B
Qb I]0xN_Lj5\s^hoc~2` >*k3
rE*D+(bTO\uypj[MUu/(w|"<loCmIV~Im}JeWWih SG;	KHn
>bX=A)v7zeas)'F~
bCPkE -]0FcZ+Hdx'cd]Zg,:
nUB431#<4{1k[@/,"zsq|M%G4;_.,LRt&ROgE`l
f@^-KJDq9K/+pYyo=.|Z:W;M=VV9CP&f!O^>(x?Qh0J
T{NitB}8`g$eru9#v!Y&
?#T}28X!AI6	Lf1_Nm62-8YzaSB<	djw5*SUtGlwX]0."vy$iRQa5\:{7QDqF'	%%P@?$)p3n7[HA6
r
        GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);
      
        GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar*
        label);
      
        _INITIALIZATION(`Gdk::Rectangle&amp;',`GdkRectangle', `$3 =
        Glib::wrap(&amp;($4))')
      
        _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 =
        ($1)($4)')
      
        _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 =
        (SizeRequestMode)($4)')
      
        _WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp;
        label{?}), gtk_tool_button_new)
      
        _WRAP_METHOD(bool get_cell_rect(const TreeModel::Path&amp; path, const
        CellRenderer&amp; cell, Gdk::Rectangle&amp; rect{&gt;&gt;}) const,
        gtk_icon_view_get_cell_rect)
      
        _WRAP_METHOD(void get_request_mode(SizeRequestMode&amp; mode{OUT})
        const, gtk_widget_get_request_mode)
      
        _WRAP_METHOD(void set_device_events(Gdk::EventMask events{.}, const
        Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),
        gtk_widget_set_device_events)
      
        _WRAP_METHOD(void set_device_events(Gdk::EventMask events{events},
        const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{device}),
        gtk_widget_set_device_events)
      
        gboolean gtk_icon_view_get_cell_rect(GtkIconView* icon_view,
        GtkTreePath* path, GtkCellRenderer* cell, GdkRectangle* rect);
      
        void gtk_widget_set_device_events(GtkWidget* widget, GdkDevice* device,
        GdkEventMask events);
      
    ...
    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));
    ...

  $ git clone git://git.gnome.org/mm-common
  $ cp -a mm-common/skeletonmm libsomethingmm

# ./configure
# make
# make install

#include &lt;gtkmm/bin.h&gt;
#include &lt;gtkmm/activatable.h&gt;
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)

namespace Gtk
{

class Button
  : public Bin,
    public Activatable
{
  _CLASS_GTKOBJECT(Button,GtkButton,GTK_BUTTON,Gtk::Bin,GtkBin)
  _IMPLEMENTS_INTERFACE(Activatable)
public:

  _CTOR_DEFAULT
  explicit Button(const Glib::ustring&amp; label, bool mnemonic = false);

  _WRAP_METHOD(void set_label(const Glib::ustring&amp; label), gtk_button_set_label)

  ...

  _WRAP_SIGNAL(void clicked(), "clicked")

  ...

  _WRAP_PROPERTY("label", Glib::ustring)
};

} // namespace Gtk

#include &lt;gtkmm/button.h&gt;

class OverriddenButton : public Gtk::Button
{
protected:
    virtual void on_clicked();
}

void OverriddenButton::on_clicked()
{
    std::cout &lt;&lt; "Hello World" &lt;&lt; std::endl;

    // call the base class's version of the method:
    Gtk::Button::on_clicked();
}

#include &lt;gtkmm/button.h&gt;

void on_button_clicked()
{
    std::cout &lt;&lt; "Hello World" &lt;&lt; std::endl;
}

main()
{
    Gtk::Button button("Hello World");
    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));
}

#include &lt;gtkmm/button.h&gt;
#include &lt;gtkmm/window.h&gt;
class Foo : public Gtk::Window
{
private:
  Gtk::Button theButton;
  // will be destroyed when the Foo object is destroyed
};

#include &lt;libsomething.h&gt;

int main(int, char**)
{
  something_init();

  std::cout &lt;&lt; get_defs(SOME_TYPE_WIDGET)
            &lt;&lt; get_defs(SOME_TYPE_STUFF);
  return 0;
}

$ ./enum.pl /usr/include/gtk-3.0/gtk/*.h &gt; gtk_enums.defs

$ ./h2def.py /usr/include/gtk-3.0/gtk/*.h &gt; gtk_methods.defs

$ cd gtk/src
$ /usr/lib/glibmm-2.4/proc/gmmproc -I ../../tools/m4 --defs . button . ./../gtkmm

$ cd tools/extra_defs_gen
$ ./generate_extra_defs &gt; gtk_signals.defs

$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \
    d="${f%/*}"; b="${f##*/}"; mv "$f" "$d/${b//skeleton/libsomething}"; \
  done

&gt; gdb with_signal
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Catchpoint 1 (exception thrown), 0x00714ff0 in __cxa_throw ()
(gdb) backtrace
#0  0x00714ff0 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#1  0x08048bd4 in throwSomething () at with_signal.cc:6
(gdb) continue
Continuing.
(with_signal:2375): glibmm-ERROR **
unhandled exception (type unknown) in signal handler

Program received signal SIGTRAP, Trace/breakpoint trap.

&gt; gdb with_signal
(gdb) run
(with_signal:2703): glibmm-ERROR **:
unhandled exception (type unknown) in signal handler

Program received signal SIGTRAP, Trace/breakpoint trap.
(gdb) backtrace
#2  0x0063c6ab in glibmm_unexpected_exception () at exceptionhandler.cc:77
#3  Glib::exception_handlers_invoke () at exceptionhandler.cc:150
#4  0x0063d370 in glibmm_source_callback (data=0x804d620) at main.cc:212
#13 0x002e1b31 in Gtk::Application::run (this=0x804f300) at application.cc:178
#14 0x08048ccc in main (argc=1, argv=0xbfffecd4) at with_signal.cc:16

&gt; gdb without_signal
(gdb) run
terminate called after throwing an instance of 'char const*'

Program received signal SIGABRT, Aborted.
(gdb) backtrace
#7  0x08048864 in throwSomething () at without_signal.cc:6
#8  0x0804887d in main (argc=1, argv=0xbfffecd4) at without_signal.cc:12

(gdb) catch throw
(gdb) commands
(gdb)   backtrace
(gdb)   continue
(gdb)   end
(gdb) set pagination off
(gdb) run

// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang*)
// It's just a comment. It's difficult to find a real-world example.

// in a class that inherits from Gtk::Window...
Glib::RefPtr&lt;PrintOperation&gt; op = PrintOperation::create();
// ...set up op...
op-&gt;run(Gtk::PRINT_OPERATION_ACTION_PREVIEW, *this);

// in class ExampleWindow's method...
Glib::RefPtr&lt;PrintOperation&gt; op = PrintOperation::create();
// ...set up op...
op-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(*this, &amp;ExampleWindow::on_printoperation_done), op));
// run the op

// with_signal.cc
#include &lt;gtkmm.h&gt;

bool throwSomething()
{
  throw "Something";
  return true;
}

int main(int argc, char** argv)
{
  Glib::signal_timeout().connect(sigc::ptr_fun(throwSomething), 500);
  Glib::RefPtr&lt;Gtk::Application&gt; app =
    Gtk::Application::create(argc, argv, "org.gtkmm.with_signal");
  app-&gt;hold();
  return app-&gt;run();
}

// without_signal.cc
#include &lt;gtkmm.h&gt;

bool throwSomething()
{
  throw "Something";
  return true;
}

int main(int argc, char** argv)
{
  throwSomething();
  Glib::RefPtr&lt;Gtk::Application&gt; app =
    Gtk::Application::create(argc, argv, "org.gtkmm.without_signal");
  return app-&gt;run();
}

//Within a class that inherits from Gtk::Window and keeps m_refPageSetup and m_refSettings as members...
Glib::RefPtr&lt;Gtk::PageSetup&gt; new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_refSettings);
m_refPageSetup = new_page_setup;

Button::Button(const Glib::ustring&amp; label, bool mnemonic)
:
  _CONSTRUCT("label", label.c_str(), "use_underline", gboolean(mnemonic))
{}

DerivedDialog* pDialog = 0;
builder-&gt;get_widget_derived("DialogBasic", pDialog);

DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder)
: Gtk::Dialog(cobject)
{
}

DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder)
: Gtk::Dialog(cobject),
  m_builder(builder),
  m_pButton(0)
{
  //Get the Glade-instantiated Button, and connect a signal handler:
  m_builder-&gt;get_widget("quit_button", m_pButton);
  if(m_pButton)
  {
    m_pButton-&gt;signal_clicked().connect( sigc::mem_fun(*this, &amp;DerivedDialog::on_button_quit) );
  }
}

Glib::RefPtr&lt;Gdk::Pixbuf&gt; pixbuf = Gdk::Pixbuf::create_from_file(filename);

Glib::RefPtr&lt;Gdk::Pixbuf&gt; pixbuf2 = pixbuf;

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
Gdk::Pixbuf&amp; underlying = *refPixbuf; //Syntax error - will not compile.

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf2 = refPixbuf;

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
int width = refPixbuf-&gt;get_width();

Glib::RefPtr&lt;Gtk::Builder&gt; builder = Gtk::Builder::create_from_file("basic.glade");

Glib::RefPtr&lt;Gtk::Builder&gt; builder = Gtk::Builder::create_from_file("basic.glade", "treeview_products");

Glib::RefPtr&lt;Gtk::PrintOperation&gt; op = Gtk::PrintOperation::create();
// ...set up op...
op-&gt;set_export_filename("test.pdf");
Gtk::PrintOperationResult res = op-&gt;run(Gtk::PRINT_OPERATION_ACTION_EXPORT);

Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = m_TreeView.get_model();
if(refModel)
{
  int cols_count = refModel-&gt;get_n_columns();
  ...
}

Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore =
Glib::RefPtr&lt;Gtk::TreeStore&gt;::cast_dynamic(refModel);
Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore2 =
Glib::RefPtr&lt;Gtk::TreeStore&gt;::cast_static(refModel);

Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore = Gtk::TreeStore::create(columns);
Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = refStore;

Glib::SignalProxy1&lt;bool, Gtk::DirectionType&gt; signal_focus()

Glib::SignalProxy3&lt;void, const TextBuffer::iterator&amp;, const Glib::ustrin&amp;, int&gt; signal_insert();

Gtk::Button* button = new Gtk::Button("example");
gtk_button_do_something_new(button-&gt;gobj());

Gtk::Button* pButton = new Gtk::Button("Test");

// do something useful with pButton

delete pButton;

Gtk::Dialog* pDialog = 0;
builder-&gt;get_widget("DialogBasic", pDialog);

Gtk::ToolButton* button = Gtk::manage(new Gtk::ToolButton(icon, "Big"));
button-&gt;set_tooltip_text("Big Brush);
group_brushes-&gt;insert(*button);

Gtk::ToolItemGroup* group_brushes =
  Gtk::manage(new Gtk::ToolItemGroup("Brushes"));
m_ToolPalette.add(*group_brushes);

Gtk::Widget* CustomPrintOperation::on_create_custom_widget()
{
  set_custom_tab_label("My custom tab");

  Gtk::Box* hbox = new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 8);
  hbox-&gt;set_border_width(6);

  Gtk::Label* label = Gtk::manage(new Gtk::Label("Enter some text: "));
  hbox-&gt;pack_start(*label, false, false);
  label-&gt;show();

  hbox-&gt;pack_start(m_Entry, false, false);
  m_Entry.show();

  return hbox;
}

void CustomPrintOperation::on_custom_widget_apply(Gtk::Widget* /* widget */)
{
  Glib::ustring user_input = m_Entry.get_text();
  //...
}

GtkButton* cbutton = get_a_button();
Gtk::Button* button = Glib::wrap(cbutton);

GtkWidget* example_widget_new(int something, const char* thing)
{
        ExampleWidget* widget;
        widget = g_object_new (EXAMPLE_TYPE_WIDGET, NULL);
        example_widget_construct(widget, "something", something, "thing", thing);
}

void example_widget_construct(ExampleWidget* widget, int something, const char* thing)
{
        //Do stuff that uses private API:
        widget-&gt;priv-&gt;thing = thing;
        do_something(something);
}

GtkWidget* example_widget_new(int something, const char* thing)
{
        return g_object_new (EXAMPLE_TYPE_WIDGET, "something", something, "thing", thing, NULL);
}

MyContainer::MyContainer()
{
  Gtk::Button* pButton = Gtk::manage(new Gtk::Button("Test"));
  add(*pButton); //add *pButton to MyContainer
}

_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)

_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle)

_CLASS_GENERIC(AttrIter, PangoAttrIterator)

_CLASS_GOBJECT(AccelGroup, GtkAccelGroup, GTK_ACCEL_GROUP, Glib::Object, GObject)

_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Bin, GtkBin)

_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCellEditableIface)

_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIconIface, Icon, GIcon)

_CLASS_OPAQUE_COPYABLE(Checksum, GChecksum, NONE, g_checksum_copy, g_checksum_free)

_CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref)

_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')

_CONVERSION(`PrintSettings&amp;',`GtkPrintSettings*',__FR2P)
_CONVERSION(`const PrintSettings&amp;',`GtkPrintSettings*',__FCR2P)
_CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_REFPTR_TO_P($3))

_IGNORE(gtk_button_box_set_spacing, gtk_button_box_get_spacing)

_IMPLEMENTS_INTERFACE(Activatable)

_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')

_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)

_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE)

_WRAP_ENUM(WindowType, GtkWindowType)

_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR)

_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_text)

_WRAP_METHOD_DOCS_ONLY(gtk_container_remove)

_WRAP_PROPERTY("label", Glib::ustring)

_WRAP_SIGNAL(void clicked(),"clicked")

_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)

bool MyCallback() { std::cout &lt;&lt; "Hello World!\n" &lt;&lt; std::endl; return true; }

bool idleFunc();

bool input_callback(Glib::IOCondition condition);

bool on_button_press(GdkEventButton* event);
Gtk::Button button("label");
button.signal_button_press_event().connect( sigc::ptr_fun(&amp;on_button_press) );

bool on_key_press_or_release_event(GdkEventKey* event)
{
  if (event-&gt;type == GDK_KEY_PRESS &amp;&amp;
    event-&gt;keyval == GDK_KEY_1 &amp;&amp;
    (event-&gt;state &amp; (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)) == GDK_MOD1_MASK)
  {
    handle_alt_1_press(); // GDK_MOD1_MASK is normally the Alt key
    return true;
  }
  return false;
}

Gtk::Entry m_entry; // in a class definition

// in the class constructor
m_entry.signal_key_press_event().connect( sigc::ptr_fun(&amp;on_key_press_or_release_event) );
m_entry.signal_key_release_event().connect( sigc::ptr_fun(&amp;on_key_press_or_release_event) );
m_entry.add_events(Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);

button.signal_button_press_event().connect( sigc::ptr_fun(&amp;on_mywindow_button_press), false );

class Server
{
public:
  //signal accessor:
  typedef sigc::signal&lt;void, bool, int&gt; type_signal_something;
  type_signal_something signal_something();

protected:
  type_signal_something m_signal_something;
};

Server::type_signal_something Server::signal_something()
{
  return m_signal_something;
}

class TextMark : public Glib::Object
{
  _CLASS_GOBJECT(TextMark, GtkTextMark, GTK_TEXT_MARK, Glib::Object, GObject)

protected:
  _WRAP_CTOR(TextMark(const Glib::ustring&amp; name, bool left_gravity = true), gtk_text_mark_new)

public:
  _WRAP_CREATE(const Glib::ustring&amp; name, bool left_gravity = true)

example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'struct'
../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' has a previous declaration here
make[4]: *** [example-widget.lo] Error 1

example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as different kind of symbol
../../libexample/libexamplemm/example-widget.h:34: error: previous declaration of 'typedef struct _ExampleWidget ExampleWidget'

int width = 0;
if(pixbuf)
{
  width = pixbuf-&gt;get_width();
}

m_button1.signal_clicked().connect( sigc::bind&lt;Glib::ustring&gt;( sigc::mem_fun(*this, &amp;HelloWorld::on_button_clicked), "button 1") );

my_connection.disconnect();

server.signal_something().connect(
  sigc::mem_fun(client, &amp;Client::on_server_something) );

sigc::connection  Glib::SignalIdle::connect(const sigc::slot&lt;bool&gt;&amp; slot,
                                    int priority = Glib::PRIORITY_DEFAULT_IDLE);

sigc::connection Glib::SignalIO::connect(const sigc::slot&lt;bool,Glib::IOCondition&gt;&amp; slot,
                                 int fd, Glib::IOCondition condition,
                                 int priority = Glib::PRIORITY_DEFAULT);

sigc::connection Glib::SignalTimeout::connect(const sigc::slot&lt;bool&gt;&amp; slot,
                                      unsigned int interval, int priority = Glib::PRIORITY_DEFAULT);

sigc::signal&lt;void, bool, int&gt; signal_something;

sigc::signal&lt;void,int&gt;::iterator signal&lt;void,int&gt;::connect( const sigc::slot&lt;void,int&gt;&amp; );

std::list&lt; Glib::RefPtr&lt;Gdk::Pixbuf&gt; &gt; listPixbufs;
Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
listPixbufs.push_back(refPixbuf);

typedef struct _ExampleWidget ExampleWidget;

struct _ExampleWidget
{
  ...
};

virtual void on_button_clicked(Glib::ustring data);

void ExampleWindow::on_printoperation_done(Gtk::PrintOperationResult result, const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)
{
  if (result == Gtk::PRINT_OPERATION_RESULT_ERROR)
    //notify user
  else if (result == Gtk::PRINT_OPERATION_RESULT_APPLY)
    //Update PrintSettings with the ones used in this PrintOperation

  if (! op-&gt;is_finished())
    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(*this, &amp;ExampleWindow::on_printoperation_status_changed), op));
}

void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&lt;PrintFormOperation&gt;&amp; op)
{
  if (op-&gt;is_finished())
    //the print job is finished
  else
    //get the status with get_status() or get_status_string()

  //update UI
}

void init()
{
  Gtk::Main::init_gtkmm_internals(); //Sets up the g type system and the Glib::wrap() table.
  wrap_init(); //Tells the Glib::wrap() table about the libsomethingmm classes.
}

void on_button_clicked();

class some_class
{
    void on_button_clicked();
};

some_class some_object;

main()
{
    Gtk::Button button;
    button.signal_clicked().connect( sigc::ptr_fun(&amp;on_button_clicked) );
    button.signal_clicked().connect( sigc::mem_fun(some_object, &amp;some_class::on_button_clicked) );
}

void on_insert(const TextBuffer::iterator&amp; pos, const Glib::ustring&amp; text, int bytes)

{
  Gtk::Button aButton;
  aButton.show();
  ...
  app-&gt;run();
}
"Hidden" Columns# keep this file sorted alphabetically, one language code per line
de
ja#include &lt;gtkmm.h&gt;#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SListHandler&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')$ ./plug &amp;$ ./socket./docextract_to_xml.py -s ~/checkout/gnome/gtk+/gtk/ &gt; gtk_docs.xml
// creates its own adjustments
Gtk::TextView textview;
// uses the newly-created adjustment for the scrollbar as well
Gtk::Scrollbar vscrollbar (textview.get_vadjustment(), Gtk::ORIENTATION_VERTICAL);// note to translators: don't translate the "[noun]" part - it is
// just here to distinguish the string from another "jumps" string
text = strip(gettext("jumps[noun]"), "[noun]");//compiler error - no conversion from ustring to int.
int number = row[m_Columns.m_col_text];2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010<application>gtkmm</application> 3 added some new classes:<application>gtkmm</application> and Win32<application>gtkmm</application> compared to Qt<application>gtkmm</application> is a wrapper<application>gtkmm</application> provides four basic types of buttons:<classname>Gtk::ToolItem</classname>s can then be added to the group. For instance, like so:<filename>libsomethingmm</filename>: Contains generated and hand-written .h and .cc files.<filename>libsomethingmm</filename>: The top-level directory.<filename>private</filename>: Contains generated <filename>*_p.h</filename> files.<filename>src</filename>: Contains .hg and .ccg source files.<function>_WRAP_METHOD()</function>, <function>_WRAP_SIGNAL()</function>, and <function>_WRAP_PROPERTY()</function><literal>drag_begin</literal>: Provides DragContext.<literal>drag_end</literal>: Provides DragContext.<literal>lower</literal>: lower range value<literal>page_increment</literal>: value to increment/decrement when pressing mouse button 2 on a button<literal>page_size</literal>: unused<literal>step_increment</literal>: value to increment/decrement when pressing mouse button 1 on a button<literal>upper</literal>: upper range value<methodname>get_preferred_height_for_width_vfunc()</methodname>: Calculate the minimum and natural height of the container, if it would be given the specified width.<methodname>get_preferred_height_vfunc()</methodname>: Calculate the minimum and natural height of the container.<methodname>get_preferred_height_vfunc()</methodname>: Calculate the minimum and natural height of the widget.<methodname>get_preferred_width_for_height_vfunc()</methodname>: Calculate the minimum and natural width of the container, if it would be given the specified height.<methodname>get_preferred_width_vfunc()</methodname>: Calculate the minimum and natural width of the container.<methodname>get_preferred_width_vfunc()</methodname>: Calculate the minimum and natural width of the widget.<methodname>get_request_mode_vfunc()</methodname>: (optional) Return what <literal>Gtk::SizeRequestMode</literal> is preferred by the widget.<methodname>get_request_mode_vfunc()</methodname>: Return what <literal>Gtk::SizeRequestMode</literal> is preferred by the container.<methodname>on_add()</methodname>: Add a child widget to the container.<methodname>on_map()</methodname>: (optional)<methodname>on_remove()</methodname>: Remove a child widget from the container.<methodname>on_unmap()</methodname>: (optional)<placeholder-1/> (or <placeholder-2/> for filenames)<placeholder-1/> example package<varname>description</varname>: A short description of the resource as a UTF-8 encoded string<varname>mime_type</varname>: The MIME type of the resourceA <classname>ProgressBar</classname> is horizontal and left-to-right by default, but you can change it to a vertical progress bar by using the <methodname>set_orientation()</methodname> method.A smartpointer acts much like a normal pointer. Here are a few examples.AM_CPPFLAGSAM_CPPFLAGS = ... -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"AM_CXXFLAGSATKAboutDialogAccessing widgetsActionsActivity ModeAdding Items to the List of Recent FilesAdding RowsAdding child rowsAdding widgetsAdjustmentsAfter starting <filename>socket</filename>, you should see the following output in the terminal:After which you should see something like the following:AhlstedtAlignmentAn improved Hello WorldAnastasovApplication LifetimeApplying TagsAspectFrameAssistantAssuming the displayed size of stringsAsynchronous operationsBasic Type equivalentsBasic TypesBasicsBefore attempting to install <application>gtkmm</application> 3.0, you might first need to install these other packages.BernhardBinding extra argumentsBjarne Stroustrup, "The C++ Programming Language" Forth Edition - section 34.3BoxesBuilding <application>gtkmm</application> on Win32ButtonButtonBoxButtonBoxesButtonsC programmers use <function>sprintf()</function> to compose and concatenate strings. C++ favours streams, but unfortunately, this approach makes translation difficult, because each fragment of text is translated separately, without allowing the translators to rearrange them according to the grammar of the language.C typeC++ typeCairo and PangoCall <methodname>show()</methodname> to display the widget.Changes in <application>gtkmm</application> 3Changing the selectionChapter on "Drawing with Cairo".Chapter on "Printing".Chapter on Keyboard Events.CheckButtonCheckboxesChrisClass macrosClipboard - IdealClipboard - SimpleColorChooserDialogCombo BoxesComboBoxComboBox with EntryComboBox with an EntryComboBoxTextComboBoxText with EntryComparison with other signalling systemsComposition of stringsConnecting Plugs and SocketsConnecting signal handlersConstructor macrosConstructorsContainer WidgetsCopyCopyingCopying the skeleton projectCreating .hg and .ccg filesCreating your own signalsCummingCurrently, <application>gettext</application> does not support non-ASCII characters (i.e. any characters with a code above 127) in source code. For instance, you cannot use the copyright sign (©).Custom ContainerCustom ContainersCustom WidgetCustom WidgetsDISTCLEANFILES = ... intltool-extract \
                 intltool-merge \
                 intltool-update \
                 po/.intltool-merge-cacheDanielDavidDefault formattingDependenciesDereferencingDesigners without programming skills can create and edit UIs.DialogsDifferent join types in CairoDisconnecting signal handlersDocumentationDocumentation build structureDrag and DropDragContextDrawing Arcs and CirclesDrawing Area - ArcsDrawing Area - ImageDrawing Area - LinesDrawing Area - TextDrawing Area - Thin LinesDrawing Curved LinesDrawing ImagesDrawing Straight LinesDrawing TextDrawing Text with PangoDrawing thin linesDrawing with relative coordinatesDynamic allocation with manage() and add()Dynamic allocation with new and deleteEditable CellsElstnerEmitted when the button is pressed and released.Emitted when the button is pressed.Emitted when the button is released.Emitted when the mouse pointer leaves the button's window.Emitted when the mouse pointer moves over the button's window.EntryEntry CompletionEntry Completion ExampleEntry with IconEntry with Progress BarEnumerations.EventBoxExampleExample Application: Creating a Clock with CairoExamplesExceptions in signal handlersExport to PDFExtending the print dialogFerreiraFileChooserFileChooserDialogFiltering Recent FilesFinally, check the status. For instance, <placeholder-1/>FontChooserDialogFor each page that needs to be rendered, the following signals are emitted: <placeholder-1/>For example, for <classname>Pango::Analysis</classname> in <filename>item.hg</filename>: <placeholder-1/>For example, from <filename>icontheme.hg</filename>: <placeholder-1/>For example, in <filename>rectangle.hg</filename>: <placeholder-1/>For example, in Pangomm, <filename>layoutline.hg</filename>: <placeholder-1/>For instance,For instance, <placeholder-1/>For instance, from <classname>Gdk::RGBA</classname>: <placeholder-1/>For instance, from <classname>Glib::Checksum</classname>: <placeholder-1/>For instance, from <filename>accelgroup.hg</filename>: <placeholder-1/>For instance, from <filename>entry.hg</filename>: <placeholder-1/>For instance, from <filename>enums.hg</filename>: <placeholder-1/>For instance, this code would be problematic:For instance:For more detailed information about signals, see the <link linkend="chapter-signals">appendix</link>.For single-selection, you can just call <methodname>get_selected()</methodname>, like so:FrameFull ExampleGTK+ 3.0Generating the .defs files.Generating the enums .defsGenerating the methods .defsGetting help with translationsGetting valuesGlade and Gtk::BuilderGlib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(
  double value,
  double lower,
  double upper,
  double step_increment = 1,
  double page_increment = 10,
  double page_size = 0);Glib::RefPtr&lt;Gtk::Application&gt; app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");Glib::RefPtr&lt;Gtk::Clipboard&gt; refClipboard = Gtk::Clipboard::get();

//Targets:
std::vector&lt;Gtk::TargetEntry&gt; targets;
targets.push_back( Gtk::TargetEntry("example_custom_target") );
targets.push_back( Gtk::TargetEntry("UTF8_STRING") );

refClipboard-&gt;set( targets,
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_get),
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_clear) );Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =
    Gtk::ListStore::create(m_Columns);Glib::RefPtr&lt;Gtk::RecentInfo&gt; info;
try
{
  info = recent_manager-&gt;lookup_item(uri);
}
catch(const Gtk::RecentManagerError&amp; ex)
{
  std::cerr &lt;&lt; "RecentManagerError: " &lt;&lt; ex.what() &lt;&lt; std::endl;
}
if (info)
{
  // item was found
}Glib::RefPtr&lt;Gtk::RecentManager&gt; recent_manager = Gtk::RecentManager::get_default();
recent_manager-&gt;add_item(uri);Glib::RefPtr&lt;Gtk::TextBuffer::Mark&gt; refMark =
    refBuffer-&gt;create_mark(iter);Glib::RefPtr&lt;Gtk::TextBuffer::Tag&gt; refTagMatch =
    Gtk::TextBuffer::Tag::create();
refTagMatch-&gt;property_background() = "orange";Glib::RefPtr&lt;Gtk::TextBuffer::TagTable&gt; refTagTable =
    Gtk::TextBuffer::TagTable::create();
refTagTable-&gt;add(refTagMatch);
//Hopefully a future version of <application>gtkmm</application> will have a set_tag_table() method,
//for use after creation of the buffer.
Glib::RefPtr&lt;Gtk::TextBuffer&gt; refBuffer =
    Gtk::TextBuffer::create(refTagTable);Glib::RefPtr&lt;Gtk::TextChildAnchor&gt; refAnchor =
    refBuffer-&gt;create_child_anchor(iter);Glib::RefPtr&lt;Gtk::TreeModelSort&gt; sorted_model =
    Gtk::TreeModelSort::create(model);
sorted_model-&gt;set_sort_column(columns.m_col_name, Gtk::SORT_ASCENDING);
treeview.set_model(sorted_model);Glib::RefPtr&lt;Gtk::TreeSelection&gt; refTreeSelection =
    m_TreeView.get_selection();Glib::RefPtr&lt;Gtk::UIManager&gt; m_refUIManager =
    Gtk::UIManager::create();
m_refUIManager-&gt;insert_action_group(m_refActionGroup);
add_accel_group(m_refUIManager-&gt;get_accel_group());Glib::ustringGlib::ustring and std::iostreamsGlib::ustring strText = row[m_Columns.m_col_text];
int number = row[m_Columns.m_col_number];Glib::ustring ui_info =
    "&lt;ui&gt;"
    "  &lt;menubar name='MenuBar'&gt;"
    "    &lt;menu action='MenuFile'&gt;"
    "      &lt;menuitem action='New'/&gt;"
    "      &lt;menuitem action='Open'/&gt;"
    "      &lt;separator/&gt;"
    "      &lt;menuitem action='Quit'/&gt;"
    "    &lt;/menu&gt;"
    "    &lt;menu action='MenuEdit'&gt;"
    "      &lt;menuitem action='Cut'/&gt;"
    "      &lt;menuitem action='Copy'/&gt;"
    "      &lt;menuitem action='Paste'/&gt;"
    "    &lt;/menu&gt;"
    "  &lt;/menubar&gt;"
    "  &lt;toolbar  name='ToolBar'&gt;"
    "    &lt;toolitem action='Open'/&gt;"
    "    &lt;toolitem action='Quit'/&gt;"
    "  &lt;/toolbar&gt;"
    "&lt;/ui&gt;";

m_refUIManager-&gt;add_ui_from_string(ui_info);Glib::ustring ui_info =
    "&lt;ui&gt;"
    "  &lt;popup name='PopupMenu'&gt;"
    "    &lt;menuitem action='ContextEdit'/&gt;"
    "    &lt;menuitem action='ContextProcess'/&gt;"
    "    &lt;menuitem action='ContextRemove'/&gt;"
    "  &lt;/popup&gt;"
    "&lt;/ui&gt;";

m_refUIManager-&gt;add_ui_from_string(ui_info);GroupsGtk::Alignment
Gtk::Arrow
Gtk::AspectFrame
Gtk::Bin
Gtk::Box
Gtk::Button
Gtk::CheckButton
Gtk::Fixed
Gtk::Frame
Gtk::Grid
Gtk::Image
Gtk::Label
Gtk::MenuItem
Gtk::Notebook
Gtk::Paned
Gtk::RadioButton
Gtk::Range
Gtk::ScrolledWindow
Gtk::Separator
Gtk::Table (deprecated from <application>gtkmm</application> version 3.4)
Gtk::ToolbarGtk::Application and command-line optionsGtk::Box(Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL, int spacing = 0);
void set_spacing(int spacing);
void set_homogeneous(bool homogeneous = true);Gtk::Button* pButton = new Gtk::Button("_Something", true);Gtk::CellRendererToggle* pRenderer =
    Gtk::manage( new Gtk::CellRendererToggle() );
pRenderer-&gt;signal_toggled().connect(
    sigc::bind( sigc::mem_fun(*this,
        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)
);Gtk::DrawingArea myArea;
Cairo::RefPtr&lt;Cairo::Context&gt; myContext = myArea.get_window()-&gt;create_cairo_context();
myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);
myContext-&gt;set_line_width(2.0);Gtk::Entry* entry = m_Combo.get_entry();
if (entry)
{
  // The Entry shall receive focus-out events.
  entry-&gt;add_events(Gdk::FOCUS_CHANGE_MASK);

  // Alternatively you can connect to m_Combo.signal_changed().
  entry-&gt;signal_changed().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_changed) );

  entry-&gt;signal_activate().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_activate) );

  entry-&gt;signal_focus_out_event().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_focus_out_event) );
}Gtk::EventBox();Gtk::TreeModel::Children children = row.children();Gtk::TreeModel::Row row = *iter;Gtk::TreeModel::Row row = m_refModel-&gt;children()[5]; //The fifth row.
if(row)
  refTreeSelection-&gt;select(row);Gtk::TreeModel::iterator iter = m_Combo.get_active();
if(iter)
{
  Gtk::TreeModel::Row row = *iter;

  //Get the data for the selected row, using our knowledge
  //of the tree model:
  int id = row[m_Columns.m_col_id];
  set_something_id_chosen(id); //Your own function.
}
else
  set_nothing_chosen(); //Your own function.Gtk::TreeModel::iterator iter = m_refListStore-&gt;append();Gtk::TreeModel::iterator iter = m_refModel-&gt;children().begin()
if(iter)
  refTreeSelection-&gt;select(iter);Gtk::TreeModel::iterator iter_child =
    m_refTreeStore-&gt;append(row.children());Gtk::TreeView::Column* pColumn =
  Gtk::manage(new Gtk::TreeView::Column("Icon Name"));

// m_columns.icon and m_columns.iconname are columns in the model.
// pColumn is the column in the TreeView:
pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);
pColumn-&gt;pack_start(m_columns.iconname);

m_TreeView.append_column(*pColumn);Gtk::TreeView::Column* pColumn = treeview.get_column(0);
if(pColumn)
  pColumn-&gt;set_sort_column(m_columns.m_col_id);Gtk::Widget* pMenubar = m_refUIManager-&gt;get_widget("/MenuBar");
pBox-&gt;add(*pMenuBar, Gtk::PACK_SHRINK);Gtk::Window window;
window.set_default_size(200, 200);Hand-coded source filesHand-coding constructorsHandling <literal>button_press_event</literal>Hello WorldHello World 2Hello World in <application>gtkmm</application>HelloWorld::HelloWorld()
:
  m_button ("Hello World")
{
  set_border_width(10);
  m_button.signal_clicked().connect(sigc::mem_fun(*this,
    &amp;HelloWorld::on_button_clicked));
  add(m_button);.
  m_button.show();
}Here is a list of some of these Widgets:Here is an example callback method:Here's a simple example: <placeholder-1/>Here's a slightly larger example of slots in action:Here's an example of a <classname>SpinButton</classname> in action:Here's an example of this technique:How gettext worksHow to use Git for GNOME translatorsINTLTOOL_FILES = intltool-extract.in \
                 intltool-merge.in \
                 intltool-update.inIT_PROG_INTLTOOL([0.35.0])

GETTEXT_PACKAGE=programname
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [The domain to use with gettext])
AM_GLIB_GNU_GETTEXT

PROGRAMNAME_LOCALEDIR=[${datadir}/locale]
AC_SUBST(PROGRAMNAME_LOCALEDIR)IdealIdle FunctionsIn <filename>configure.ac</filename>, <placeholder-1/>In the top-level Makefile.am: <placeholder-1/>Includes the other files.Independently sorted views of the same modelInfoBarInitializationInstallationInstalling <application>gtkmm</application> with <application>jhbuild</application>Installing From SourceInstalling and Using the git version of <application>gtkmm</application>Internationalization and LocalizationIntltool READMEIntroductionIt also takes an optional extra argument: <placeholder-1/>JonathonJongsmaKeyboard EventsKeyboard Events - SimpleKingKjellL10N Guidelines for DevelopersLabelLack of propertiesLaursenLess C++ code is required.Line stylesListStoreListStore, for rowsLoading the .glade fileMain MenuMain Menu exampleMakefile.am filesManaged WidgetsMarking strings for translationMarkoMarksMemory managementMenus and ToolbarsMessageDialogMethod macrosMethodsMicrosoft WindowsMiscellaneous WidgetsMixing C and C++ APIsModelColumns()
{ add(m_col_id); add(m_col_name); }

  Gtk::TreeModelColumn&lt;int&gt; m_col_id;
  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_name;
};

ModelColumns m_columns;Modifying build filesModifying the List of Recent FilesMonitoring I/OMost of our examples use this technique.MoveMultiple-item widgetsMurrayMurray CummingNicolai M. Josuttis, "The C++ Standard Library" - section 4.2Non-modal AboutDialogNormal C++ memory managementNote that you must specify actions for sub menus as well as menu items.NotebookNow let's look at the connection again:Objects and functions.Of course this means that you can store <classname>RefPtr</classname>s in standard containers, such as <classname>std::vector</classname> or <classname>std::list</classname>.OleOther macrosOverriding default signal handlersOverviewPKG_CHECK_MODULES([MYAPP], [gtkmm-3.0 &gt;= 3.8.0])Pack the widget into a container using the appropriate call, e.g. <methodname>Gtk::Container::add()</methodname> or <methodname>pack_start()</methodname>.PackingPage setupPangoParts of chapter on "Internationalization".Parts of the update from gtkmm 2 to gtkmm 3.PastePedroPermission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.PitfallsPlease see <ulink url="https://wiki.gnome.org/Projects/gtkmm/MSWindows/BuildingGtkmm"> https://wiki.gnome.org/Projects/gtkmm/MSWindows/BuildingGtkmm</ulink> for instructions on how to build gtkmm on Windows.PlugsPlugs and SocketsPlugs and Sockets ExamplePopup Context MenuPopup MenuPopup Menu examplePopup MenusPrebuilt PackagesPreparing your projectPreventing row selectionPreviewPrintOperationPrintingPrinting - SimpleProblems in the C API.Programming with <application>gtkmm</application> 3Progress bars are used to show the status of an ongoing operation. For instance, a <classname>ProgressBar</classname> can show how much of a task has been completed.ProgressBarPuts the generated code in #ifdef blocks.Radio buttonsRadioButtonRecentChooserRecentManagerRecently Used DocumentsRecommended TechniquesReferenceRendering textReorderable rowsResourcesResponding to changesReusing C documentationRiederSame strings, different semanticsScrollbar WidgetsScrolledWindowScrollingSection on Gtk::Grid.Setting a prefixSetting up jhbuildSetting valuesShared resourcesSignal Handler sequenceSignalsSignals and properties.SimpleSimple ExampleSimple RecentChooserDialog exampleSimple Text ExampleSingle or multiple selectionSo you should either avoid this situation or use <ulink url="http://developer.gnome.org/glibmm/unstable/classGlib_1_1ustring.html"><function>Glib::ustring::compose()</function></ulink> which supports syntax such as: <placeholder-1/>SocketsSortingSorting by clicking on columnsSource CodeSources and DestinationsSpecifying CellRenderer detailsSpinButtonTableTagTableTagsTags and FormattingTargetsTesting and adding translationsTextViewThe "changed" signalThe .hg and .ccg filesThe <classname>Gtk::Button</classname> widget has the following signals, but most of the time you will just handle the <literal>clicked</literal> signal:The <parameter>options</parameter> argument can take one of these three options: <placeholder-1/>The BufferThe Cairo Drawing ModelThe ClipboardThe Drawing Area WidgetThe ModelThe RefPtr smartpointerThe SelectionThe TreeView widgetThe ViewThe arguments to <methodname>Action::create()</methodname> specify the action's name and how it will appear in menus and toolbars.The build structureThe chosen itemThe command line options passed to the C preprocessor.The command line options passed to the C++ compiler.The constraintsThe entryThe following example demonstrates the use of <classname>RadioButton</classname>s:The following example program requires a command-line option. The source code shows two ways of handling command-line options in combination with <classname>Gtk::Application</classname>.The macros are explained in more detail in the following sections.The macros in this example do the following: <placeholder-1/>The modelThe name of the library, such as libsomethingmm.The native GTK+ print dialog has a preview button, but you may also start a preview directly from an application: <placeholder-1/>The next two lines of code create a window and set its default (initial) size:The rulesThe selected rowsThe text columnThe window ID is: 69206019Then start the <filename>socket</filename> program:There are a few common mistakes that you would discover eventually yourself. But this section might help you to avoid them.There are basically five different styles, as shown in this picture:There are some optional extra arguments: <placeholder-1/>There are two basic strategies that can be used: <placeholder-1/>There is a more complex example in examples/others/dnd.There is one optional extra argument: <placeholder-1/>These dependencies have their own dependencies, including the following applications and libraries:This bookThis book assumes a good understanding of C++, and how to create C++ programs.This example creates a button with a picture and a label.This example implements a widget which draws a Penrose triangle.This has the following advantages: <placeholder-1/>This is a full working example that defines and uses custom signals.This is demonstrated in the drag_and_drop example.This macro will be used when you initialize <literal>gettext</literal> in your source code.To add a new file to the list of recent documents, in the simplest case, you only need to provide the URI. For example:To begin our introduction to <application>gtkmm</application>, we'll start with the simplest program possible. This program will create an empty 200 x 200 pixel window.To change the selection, specify a <classname>Gtk::TreeModel::iterator</classname> or <classname>Gtk::TreeModel::Row</classname>, like so:To do this, you need to call the <methodname>pulse()</methodname> method at regular intervals. You can also choose the step size, with the <methodname>set_pulse_step()</methodname> method.Toggle buttonsToggleButtonToolItem ReferenceToolItemGroup ReferenceToolPaletteToolPalette ExampleToolPalette ReferenceTooltipTooltip ReferenceTooltipsTreeModel::iterator iter = refTreeSelection-&gt;get_selected();
if(iter) //If anything is selected
{
  TreeModel::Row row = *iter;
  //Do something with the row.
}TreeModelSort ReferenceTreeSortable ReferenceTreeStoreTreeStore, for a hierarchyTreeView - Drag And DropTreeView - Editable CellsTreeView - ListStoreTreeView - Popup Context MenuTreeView - TreeStoreUIManagerUnix and LinuxUnusual wordsUpdate your <literal>DISTCLEANFILES</literal>: <placeholder-1/>Use <methodname>Gtk::Builder::get_widget_derived()</methodname> like so: <placeholder-1/>Useful methodsUsing Glib::DispatcherUsing a <application>gtkmm</application> widgetUsing a ModelUsing derived widgetsUsing non-ASCII characters in stringsUsing the git version of <application>gtkmm</application>VineWe will now explain each line of the exampleWhen the Button emits its <literal>clicked</literal> signal, <methodname>on_button_clicked()</methodname> will be called.Why use <application>gtkmm</application> instead of GTK+?Widget ReferenceWidgetsWidgets Without X-WindowsWidgets and ChildAnchorsWorking with gtkmm's Source CodeWrapping C Libraries with gmmprocWriting signal handlersWriting the vfuncs .defsX Event signalsYou can also specify a signal handler when calling <methodname>ActionGroup::add()</methodname>. This signal handler will be called when the action is activated via either a menu item or a toolbar button.You can copy <classname>RefPtr</classname>s, just like normal pointers. But unlike normal pointers, you don't need to worry about deleting the underlying instance.You never know how much space a string will take on screen when translated. It might very possibly be twice the size of the original English string. Luckily, most <application>gtkmm</application> widgets will expand at runtime to the required size.You should avoid cryptic abbreviations, slang, or jargon. They are usually difficult to translate, and are often difficult for even native speakers to understand. For instance, prefer "application" to "app"_CLASS_BOXEDTYPE_CLASS_BOXEDTYPE_STATIC_CLASS_BOXEDTYPE_STATIC( C++ class, C class )_CLASS_GENERIC_CLASS_GENERIC( C++ class, C class )_CLASS_GOBJECT_CLASS_GTKOBJECT_CLASS_GTKOBJECT()_CLASS_INTERFACE_CLASS_OPAQUE_COPYABLE_CLASS_OPAQUE_REFCOUNTED_CTOR_DEFAULT_DEFS()_IGNORE / _IGNORE_SIGNAL_IGNORE(C function name 1, C function name2, etc)_IGNORE_SIGNAL(C signal name 1, C signal name2, etc)_IMPLEMENTS_INTERFACE_IMPLEMENTS_INTERFACE()_IMPLEMENTS_INTERFACE(C++ interface name)_MEMBER_GET / _MEMBER_SET_MEMBER_GET(C++ name, C name, C++ type, C type)_MEMBER_GET(x, x, int, int)_MEMBER_GET_GOBJECT / _MEMBER_SET_GOBJECT_MEMBER_GET_GOBJECT(C++ name, C name, C++ type, C type)_MEMBER_GET_PTR / _MEMBER_SET_PTR_MEMBER_GET_PTR(C++ name, C name, C++ type, C type)_MEMBER_SET(C++ name, C name, C++ type, C type)_MEMBER_SET_GOBJECT(C++ name, C name, C++ type, C type)_MEMBER_SET_PTR(C++ name, C name, C++ type, C type)_PINCLUDE()_WRAP_CTOR_WRAP_ENUM_WRAP_ENUM_DOCS_ONLY_WRAP_GERROR_WRAP_METHOD_WRAP_METHOD( C++ method signature, C function name)_WRAP_METHOD_DOCS_ONLY_WRAP_METHOD_DOCS_ONLY(C function name)_WRAP_PROPERTY_WRAP_PROPERTY(C property name, C++ type)_WRAP_SIGNAL_WRAP_SIGNAL( C++ signal handler signature, C signal name)_WRAP_VFUNC_WRAP_VFUNC( C++ method signature, C function name)adj-&gt;signal_value_changed().connect(sigc::bind&lt;MyPicture*&gt;(sigc::mem_fun(*this,
    &amp;cb_rotate_picture), picture));adjustment-&gt;signal_changed();atkmmbinding_namebindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);boolbool DemoWindow::select_function(
    const Glib::RefPtr&lt;Gtk::TreeModel&gt;&amp; model,
    const Gtk::TreeModel::Path&amp; path, bool)
{
  const Gtk::TreeModel::iterator iter = model-&gt;get_iter(path);
  return iter-&gt;children().empty(); // only allow leaf nodes to be selected
}bool ExampleWindow::on_button_press_event(GdkEventButton* event)
{
  if( (event-&gt;type == GDK_BUTTON_PRESS) &amp;&amp;
      (event-&gt;button == 3) )
  {
    m_Menu_Popup-&gt;popup(event-&gt;button, event-&gt;time);
    return true; //It has been handled.
  }
  else
    return false;
}bool MyArea::on_draw(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr)
{
  Glib::RefPtr&lt;Gdk::Pixbuf&gt; image = Gdk::Pixbuf::create_from_file("myimage.png");
  // Draw the image at 110, 90, except for the outermost 10 pixels.
  Gdk::Cairo::set_source_pixbuf(cr, image, 100, 80);
  cr-&gt;rectangle(110, 90, image-&gt;get_width()-20, image-&gt;get_height()-20);
  cr-&gt;fill();
  return true;
}buttons examplecairocairommcell.property_editable() = true;class HelloWorld : public Gtk::Window
{

public:
  HelloWorld();
  virtual ~HelloWorld();

protected:
  //Signal handlers:
  virtual void on_button_clicked();

  //Member widgets:
  Gtk::Button m_button;
};class RadioButtons : public Gtk::Window
{
public:
    RadioButtons();

protected:
    Gtk::RadioButton m_rb1, m_rb2, m_rb3;
};

RadioButtons::RadioButtons()
  : m_rb1("button1"),
    m_rb2("button2"),
    m_rb3("button3")
{
    Gtk::RadioButton::Group group = m_rb1.get_group();
    m_rb2.set_group(group);
    m_rb3.set_group(group);
}class RadioButtons : public Gtk::Window
{
public:
    RadioButtons();
};

RadioButtons::RadioButtons()
{
    Gtk::RadioButton::Group group;
    Gtk::RadioButton *m_rb1 = Gtk::manage(
      new Gtk::RadioButton(group,"button1"));
    Gtk::RadioButton *m_rb2 = manage(
      new Gtk::RadioButton(group,"button2"));
      Gtk::RadioButton *m_rb3 = manage(
        new Gtk::RadioButton(group,"button3"));
}clickedconfigure.acconstversioncontext-&gt;save();
context-&gt;translate(x, y);
context-&gt;scale(width / 2.0, height / 2.0);
context-&gt;arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI);
context-&gt;restore();custom_c_callbackcustom_default_handlercustom_vfunccustom_vfunc_callbackdeprecateddisplay_message("Getting ready for i18n.");display_message(_("Getting ready for i18n."));doubleenterenumserrthrowevent_box.add(child_widget);functionsg++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`gbooleangchar*gdk-pixbufgdoublegettext manualgintglibglibmmgmmproc Parameter Processinggnomemm_hellogtk.defsgtk_enums.defsgtk_methods.defsgtk_signals.defsgtk_vfuncs.defsgtkmmgtkmm_helloguintgunicharifdefintint cols_count = m_TreeView.append_column_editable("Alex", m_columns.alex);
Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
if(pColumn)
{
  Gtk::CellRendererToggle* pRenderer =
    static_cast&lt;Gtk::CellRendererToggle*&gt;(pColumn-&gt;get_first_cell());
  pColumn-&gt;add_attribute(pRenderer-&gt;property_visible(), m_columns.visible);
  pColumn-&gt;add_attribute(pRenderer-&gt;property_activatable(), m_columns.world);int main(int argc, char** argv)
{
  Glib::RefPtr&lt;Gtk::Application&gt; app = Gtk::Application::create(argc, argv, "org.gtkmm.example");

  HelloWorld helloworld;
  return app-&gt;run(helloworld);
}intltool-update --potleavelib_LTLIBRARIESlibsigc++ 2.0m4 Conversionsm4 Initializationsm_TextView.add_child_at_anchor(m_Button, refAnchor);m_TreeView.append_column("Messages", m_Columns.m_col_text);m_TreeView.set_model(m_refListStore);m_box.pack_start(m_Button1);
m_box.pack_start(m_Button2);m_button1.signal_clicked().connect( sigc::mem_fun(*this,
  &amp;HelloWorld::on_button_clicked) );m_combo.set_entry_text_column(m_columns.m_col_name);m_combo.signal_changed().connect( sigc::mem_fun(*this,
      &amp;ExampleWindow::on_combo_changed) );m_frame.add(m_box);m_rb2.set_group(m_rb1.get_group()); //doesn't workm_refActionGroup = Gtk::ActionGroup::create();

m_refActionGroup-&gt;add( Gtk::Action::create("MenuFile", "_File") );
m_refActionGroup-&gt;add( Gtk::Action::create("New", "_New"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_new) );
m_refActionGroup-&gt;add( Gtk::Action::create("ExportData", "Export Data"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_open) );
m_refActionGroup-&gt;add( Gtk::Action::create("Quit", "_Quit"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_quit) );m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,
    &amp;DemoWindow::select_function) );modules = [ 'gtkmm' ]moduleset = 'gnome-suites-core-deps-3.12'no_default_handlerno_slot_copyorpangommpkg-configpressedpropertiesrefBuffer-&gt;apply_tag(refTagMatch, iterRangeStart, iterRangeStop);refBuffer-&gt;insert_with_tag(iter, "Some text", refTagMatch);refClipboard-&gt;request_contents("example_custom_target",
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_received) );refClipboard-&gt;request_targets( sigc::mem_fun(*this,
    &amp;ExampleWindow::on_clipboard_received_targets) );refTreeSelection-&gt;selected_foreach_iter(
    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );

void TheClass::selected_row_callback(
    const Gtk::TreeModel::iterator&amp; iter)
{
  TreeModel::Row row = *iter;
  //Do something with the row.
}refTreeSelection-&gt;set_mode(Gtk::SELECTION_MULTIPLE);refTreeSelection-&gt;signal_changed().connect(
    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)
);refreturnrefreturn_ctypereleasedreturn app-&gt;run(window);row[m_Columns.m_col_text] = "sometext";signalsslot_callbackslot_namesrc/main.cc
src/other.ccstd::cout &lt;&lt; Glib::ustring::compose(
             _("Current amount: %1 Future: %2"), amount, future) &lt;&lt; std::endl;

label.set_text(Glib::ustring::compose(_("Really delete %1 now?"), filename));std::cout &lt;&lt; _("Current amount: ") &lt;&lt; amount
          &lt;&lt; _(" Future: ") &lt;&lt; future &lt;&lt; std::endl;

label.set_text(_("Really delete ") + filename + _(" now?"));std::ostringstream output;
output.imbue(std::locale("")); // use the user's locale for this stream
output &lt;&lt; percentage &lt;&lt; " % done";
label-&gt;set_text(Glib::locale_to_utf8(output.str()));std::stringstd::vector&lt; Glib::RefPtr&lt;Gtk::RecentInfo&gt; &gt; info_list = recent_manager-&gt;get_items();translator-creditstypedef Gtk::TreeModel::Children type_children; //minimise code length.
type_children children = refModel-&gt;children();
for(type_children::iterator iter = children.begin();
    iter != children.end(); ++iter)
{
  Gtk::TreeModel::Row row = *iter;
  //Do something with the row - see above for set/get.
}vfuncsvoid ExampleWindow::on_button_delete()
{
  Glib::RefPtr&lt;Gtk::TreeSelection&gt; refTreeSelection =
      m_treeview.get_selection();
  if(refTreeSelection)
  {
    Gtk::TreeModel::iterator sorted_iter =
        m_refTreeSelection-&gt;get_selected();
    if(sorted_iter)
    {
      Gtk::TreeModel::iterator iter =
          m_refModelSort-&gt;convert_iter_to_child_iter(sorted_iter);
      m_refModel-&gt;erase(iter);
    }
  }
}void ExampleWindow::on_clipboard_get(
    Gtk::SelectionData&amp; selection_data, guint /* info */)
{
  const std::string target = selection_data.get_target();

  if(target == "example_custom_target")
    selection_data.set("example_custom_target", m_ClipboardStore);
}void ExampleWindow::on_clipboard_received(
    const Gtk::SelectionData&amp; selection_data)
{
  Glib::ustring clipboard_data = selection_data.get_data_as_string();
  //Do something with the pasted data.
}void ExampleWindow::on_clipboard_received_targets(
  const std::vector&lt;Glib::ustring&gt;&amp; targets)
{
  const bool bPasteIsPossible =
    std::find(targets.begin(), targets.end(),
      example_target_custom) != targets.end();

  // Enable/Disable the Paste button appropriately:
  m_Button_Paste.set_sensitive(bPasteIsPossible);
}void cb_rotate_picture (MyPicture* picture)
{
  picture-&gt;set_rotation(adj-&gt;get_value());
...void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, int x)
{
    context-&gt;save();
    // change graphics state
    // perform drawing operations
    context-&gt;restore();
}void drag_dest_set(const std::vector&lt;Gtk::TargetEntry&gt;&amp; targets,
    Gtk::DestDefaults flags, Gdk::DragAction actions);void drag_source_set(const std::vector&lt;Gtk::TargetEntry&gt;&amp; targets,
      Gdk::ModifierType start_button_mask, Gdk::DragAction actions);void pack_start(Gtk::Widget&amp; child,
                Gtk::PackOptions options = Gtk::PACK_EXPAND_WIDGET,
                guint padding = 0);wrap_init_flagsxgettext -a -o my-strings --omit-header *.cc *.hProject-Id-Version: gtkmm-documentation master
PO-Revision-Date: 2017-10-24 11:11+0200
Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>
Language-Team: German <gnome-de@gnome.org>
Language: de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
X-Generator: Poedit 2.0.3

        GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);
      
        GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar*
        label);
      
        _INITIALIZATION(`Gdk::Rectangle&amp;',`GdkRectangle', `$3 =
        Glib::wrap(&amp;($4))')
      
        _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 =
        ($1)($4)')
      
        _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 =
        (SizeRequestMode)($4)')
      
        _WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp;
        label{?}), gtk_tool_button_new)
      
        _WRAP_METHOD(bool get_cell_rect(const TreeModel::Path&amp; path, const
        CellRenderer&amp; cell, Gdk::Rectangle&amp; rect{&gt;&gt;}) const,
        gtk_icon_view_get_cell_rect)
      
        _WRAP_METHOD(void get_request_mode(SizeRequestMode&amp; mode{OUT})
        const, gtk_widget_get_request_mode)
      
        _WRAP_METHOD(void set_device_events(Gdk::EventMask events{.}, const
        Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),
        gtk_widget_set_device_events)
      
        _WRAP_METHOD(void set_device_events(Gdk::EventMask events{events},
        const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{device}),
        gtk_widget_set_device_events)
      
        gboolean gtk_icon_view_get_cell_rect(GtkIconView* icon_view,
        GtkTreePath* path, GtkCellRenderer* cell, GdkRectangle* rect);
      
        void gtk_widget_set_device_events(GtkWidget* widget, GdkDevice* device,
        GdkEventMask events);
      
    ...
    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));
    ...

  $ git clone git://git.gnome.org/mm-common
  $ cp -a mm-common/skeletonmm libsomethingmm

# ./configure
# make
# make install

#include &lt;gtkmm/bin.h&gt;
#include &lt;gtkmm/activatable.h&gt;
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)

namespace Gtk
{

class Button
  : public Bin,
    public Activatable
{
  _CLASS_GTKOBJECT(Button,GtkButton,GTK_BUTTON,Gtk::Bin,GtkBin)
  _IMPLEMENTS_INTERFACE(Activatable)
public:

  _CTOR_DEFAULT
  explicit Button(const Glib::ustring&amp; label, bool mnemonic = false);

  _WRAP_METHOD(void set_label(const Glib::ustring&amp; label), gtk_button_set_label)

  ...

  _WRAP_SIGNAL(void clicked(), "clicked")

  ...

  _WRAP_PROPERTY("label", Glib::ustring)
};

} // namespace Gtk

#include &lt;gtkmm/button.h&gt;

class OverriddenButton : public Gtk::Button
{
protected:
    virtual void on_clicked();
}

void OverriddenButton::on_clicked()
{
    std::cout &lt;&lt; "Hello World" &lt;&lt; std::endl;

    // call the base class's version of the method:
    Gtk::Button::on_clicked();
}

#include &lt;gtkmm/button.h&gt;

void on_button_clicked()
{
    std::cout &lt;&lt; "Hello World" &lt;&lt; std::endl;
}

main()
{
    Gtk::Button button("Hello World");
    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));
}

#include &lt;gtkmm/button.h&gt;
#include &lt;gtkmm/window.h&gt;
class Foo : public Gtk::Window
{
private:
  Gtk::Button theButton;
  // will be destroyed when the Foo object is destroyed
};

#include &lt;libsomething.h&gt;

int main(int, char**)
{
  something_init();

  std::cout &lt;&lt; get_defs(SOME_TYPE_WIDGET)
            &lt;&lt; get_defs(SOME_TYPE_STUFF);
  return 0;
}

$ ./enum.pl /usr/include/gtk-3.0/gtk/*.h &gt; gtk_enums.defs

$ ./h2def.py /usr/include/gtk-3.0/gtk/*.h &gt; gtk_methods.defs

$ cd gtk/src
$ /usr/lib/glibmm-2.4/proc/gmmproc -I ../../tools/m4 --defs . button . ./../gtkmm

$ cd tools/extra_defs_gen
$ ./generate_extra_defs &gt; gtk_signals.defs

$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \
    d="${f%/*}"; b="${f##*/}"; mv "$f" "$d/${b//skeleton/libsomething}"; \
  done

&gt; gdb with_signal
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Catchpoint 1 (exception thrown), 0x00714ff0 in __cxa_throw ()
(gdb) backtrace
#0  0x00714ff0 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#1  0x08048bd4 in throwSomething () at with_signal.cc:6
(gdb) continue
Continuing.
(with_signal:2375): glibmm-ERROR **
unhandled exception (type unknown) in signal handler

Program received signal SIGTRAP, Trace/breakpoint trap.

&gt; gdb with_signal
(gdb) run
(with_signal:2703): glibmm-ERROR **:
unhandled exception (type unknown) in signal handler

Program received signal SIGTRAP, Trace/breakpoint trap.
(gdb) backtrace
#2  0x0063c6ab in glibmm_unexpected_exception () at exceptionhandler.cc:77
#3  Glib::exception_handlers_invoke () at exceptionhandler.cc:150
#4  0x0063d370 in glibmm_source_callback (data=0x804d620) at main.cc:212
#13 0x002e1b31 in Gtk::Application::run (this=0x804f300) at application.cc:178
#14 0x08048ccc in main (argc=1, argv=0xbfffecd4) at with_signal.cc:16

&gt; gdb without_signal
(gdb) run
terminate called after throwing an instance of 'char const*'

Program received signal SIGABRT, Aborted.
(gdb) backtrace
#7  0x08048864 in throwSomething () at without_signal.cc:6
#8  0x0804887d in main (argc=1, argv=0xbfffecd4) at without_signal.cc:12

(gdb) catch throw
(gdb) commands
(gdb)   backtrace
(gdb)   continue
(gdb)   end
(gdb) set pagination off
(gdb) run

// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang*)
// It's just a comment. It's difficult to find a real-world example.

// in a class that inherits from Gtk::Window...
Glib::RefPtr&lt;PrintOperation&gt; op = PrintOperation::create();
// ...set up op...
op-&gt;run(Gtk::PRINT_OPERATION_ACTION_PREVIEW, *this);

// in class ExampleWindow's method...
Glib::RefPtr&lt;PrintOperation&gt; op = PrintOperation::create();
// ...set up op...
op-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(*this, &amp;ExampleWindow::on_printoperation_done), op));
// run the op

// with_signal.cc
#include &lt;gtkmm.h&gt;

bool throwSomething()
{
  throw "Something";
  return true;
}

int main(int argc, char** argv)
{
  Glib::signal_timeout().connect(sigc::ptr_fun(throwSomething), 500);
  Glib::RefPtr&lt;Gtk::Application&gt; app =
    Gtk::Application::create(argc, argv, "org.gtkmm.with_signal");
  app-&gt;hold();
  return app-&gt;run();
}

// without_signal.cc
#include &lt;gtkmm.h&gt;

bool throwSomething()
{
  throw "Something";
  return true;
}

int main(int argc, char** argv)
{
  throwSomething();
  Glib::RefPtr&lt;Gtk::Application&gt; app =
    Gtk::Application::create(argc, argv, "org.gtkmm.without_signal");
  return app-&gt;run();
}

//Within a class that inherits from Gtk::Window and keeps m_refPageSetup and m_refSettings as members...
Glib::RefPtr&lt;Gtk::PageSetup&gt; new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_refSettings);
m_refPageSetup = new_page_setup;

Button::Button(const Glib::ustring&amp; label, bool mnemonic)
:
  _CONSTRUCT("label", label.c_str(), "use_underline", gboolean(mnemonic))
{}

DerivedDialog* pDialog = 0;
builder-&gt;get_widget_derived("DialogBasic", pDialog);

DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder)
: Gtk::Dialog(cobject)
{
}

DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder)
: Gtk::Dialog(cobject),
  m_builder(builder),
  m_pButton(0)
{
  //Get the Glade-instantiated Button, and connect a signal handler:
  m_builder-&gt;get_widget("quit_button", m_pButton);
  if(m_pButton)
  {
    m_pButton-&gt;signal_clicked().connect( sigc::mem_fun(*this, &amp;DerivedDialog::on_button_quit) );
  }
}

Glib::RefPtr&lt;Gdk::Pixbuf&gt; pixbuf = Gdk::Pixbuf::create_from_file(filename);

Glib::RefPtr&lt;Gdk::Pixbuf&gt; pixbuf2 = pixbuf;

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
Gdk::Pixbuf&amp; underlying = *refPixbuf; //Syntax error - will not compile.

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf2 = refPixbuf;

Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
int width = refPixbuf-&gt;get_width();

Glib::RefPtr&lt;Gtk::Builder&gt; builder = Gtk::Builder::create_from_file("basic.glade");

Glib::RefPtr&lt;Gtk::Builder&gt; builder = Gtk::Builder::create_from_file("basic.glade", "treeview_products");

Glib::RefPtr&lt;Gtk::PrintOperation&gt; op = Gtk::PrintOperation::create();
// ...set up op...
op-&gt;set_export_filename("test.pdf");
Gtk::PrintOperationResult res = op-&gt;run(Gtk::PRINT_OPERATION_ACTION_EXPORT);

Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = m_TreeView.get_model();
if(refModel)
{
  int cols_count = refModel-&gt;get_n_columns();
  ...
}

Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore =
Glib::RefPtr&lt;Gtk::TreeStore&gt;::cast_dynamic(refModel);
Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore2 =
Glib::RefPtr&lt;Gtk::TreeStore&gt;::cast_static(refModel);

Glib::RefPtr&lt;Gtk::TreeStore&gt; refStore = Gtk::TreeStore::create(columns);
Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = refStore;

Glib::SignalProxy1&lt;bool, Gtk::DirectionType&gt; signal_focus()

Glib::SignalProxy3&lt;void, const TextBuffer::iterator&amp;, const Glib::ustrin&amp;, int&gt; signal_insert();

Gtk::Button* button = new Gtk::Button("example");
gtk_button_do_something_new(button-&gt;gobj());

Gtk::Button* pButton = new Gtk::Button("Test");

// do something useful with pButton

delete pButton;

Gtk::Dialog* pDialog = 0;
builder-&gt;get_widget("DialogBasic", pDialog);

Gtk::ToolButton* button = Gtk::manage(new Gtk::ToolButton(icon, "Big"));
button-&gt;set_tooltip_text("Big Brush);
group_brushes-&gt;insert(*button);

Gtk::ToolItemGroup* group_brushes =
  Gtk::manage(new Gtk::ToolItemGroup("Brushes"));
m_ToolPalette.add(*group_brushes);

Gtk::Widget* CustomPrintOperation::on_create_custom_widget()
{
  set_custom_tab_label("My custom tab");

  Gtk::Box* hbox = new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 8);
  hbox-&gt;set_border_width(6);

  Gtk::Label* label = Gtk::manage(new Gtk::Label("Enter some text: "));
  hbox-&gt;pack_start(*label, false, false);
  label-&gt;show();

  hbox-&gt;pack_start(m_Entry, false, false);
  m_Entry.show();

  return hbox;
}

void CustomPrintOperation::on_custom_widget_apply(Gtk::Widget* /* widget */)
{
  Glib::ustring user_input = m_Entry.get_text();
  //...
}

GtkButton* cbutton = get_a_button();
Gtk::Button* button = Glib::wrap(cbutton);

GtkWidget* example_widget_new(int something, const char* thing)
{
        ExampleWidget* widget;
        widget = g_object_new (EXAMPLE_TYPE_WIDGET, NULL);
        example_widget_construct(widget, "something", something, "thing", thing);
}

void example_widget_construct(ExampleWidget* widget, int something, const char* thing)
{
        //Do stuff that uses private API:
        widget-&gt;priv-&gt;thing = thing;
        do_something(something);
}

GtkWidget* example_widget_new(int something, const char* thing)
{
        return g_object_new (EXAMPLE_TYPE_WIDGET, "something", something, "thing", thing, NULL);
}

MyContainer::MyContainer()
{
  Gtk::Button* pButton = Gtk::manage(new Gtk::Button("Test"));
  add(*pButton); //add *pButton to MyContainer
}

_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)

_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle)

_CLASS_GENERIC(AttrIter, PangoAttrIterator)

_CLASS_GOBJECT(AccelGroup, GtkAccelGroup, GTK_ACCEL_GROUP, Glib::Object, GObject)

_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Bin, GtkBin)

_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCellEditableIface)

_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIconIface, Icon, GIcon)

_CLASS_OPAQUE_COPYABLE(Checksum, GChecksum, NONE, g_checksum_copy, g_checksum_free)

_CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref)

_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')

_CONVERSION(`PrintSettings&amp;',`GtkPrintSettings*',__FR2P)
_CONVERSION(`const PrintSettings&amp;',`GtkPrintSettings*',__FCR2P)
_CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_REFPTR_TO_P($3))

_IGNORE(gtk_button_box_set_spacing, gtk_button_box_get_spacing)

_IMPLEMENTS_INTERFACE(Activatable)

_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')

_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)

_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE)

_WRAP_ENUM(WindowType, GtkWindowType)

_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR)

_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_text)

_WRAP_METHOD_DOCS_ONLY(gtk_container_remove)

_WRAP_PROPERTY("label", Glib::ustring)

_WRAP_SIGNAL(void clicked(),"clicked")

_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)

bool MyCallback() { std::cout &lt;&lt; "Hello World!\n" &lt;&lt; std::endl; return true; }

bool idleFunc();

bool input_callback(Glib::IOCondition condition);

bool on_button_press(GdkEventButton* event);
Gtk::Button button("label");
button.signal_button_press_event().connect( sigc::ptr_fun(&amp;on_button_press) );

bool on_key_press_or_release_event(GdkEventKey* event)
{
  if (event-&gt;type == GDK_KEY_PRESS &amp;&amp;
    event-&gt;keyval == GDK_KEY_1 &amp;&amp;
    (event-&gt;state &amp; (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)) == GDK_MOD1_MASK)
  {
    handle_alt_1_press(); // GDK_MOD1_MASK is normally the Alt key
    return true;
  }
  return false;
}

Gtk::Entry m_entry; // in a class definition

// in the class constructor
m_entry.signal_key_press_event().connect( sigc::ptr_fun(&amp;on_key_press_or_release_event) );
m_entry.signal_key_release_event().connect( sigc::ptr_fun(&amp;on_key_press_or_release_event) );
m_entry.add_events(Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);

button.signal_button_press_event().connect( sigc::ptr_fun(&amp;on_mywindow_button_press), false );

class Server
{
public:
  //signal accessor:
  typedef sigc::signal&lt;void, bool, int&gt; type_signal_something;
  type_signal_something signal_something();

protected:
  type_signal_something m_signal_something;
};

Server::type_signal_something Server::signal_something()
{
  return m_signal_something;
}

class TextMark : public Glib::Object
{
  _CLASS_GOBJECT(TextMark, GtkTextMark, GTK_TEXT_MARK, Glib::Object, GObject)

protected:
  _WRAP_CTOR(TextMark(const Glib::ustring&amp; name, bool left_gravity = true), gtk_text_mark_new)

public:
  _WRAP_CREATE(const Glib::ustring&amp; name, bool left_gravity = true)

example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'struct'
../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' has a previous declaration here
make[4]: *** [example-widget.lo] Error 1

example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as different kind of symbol
../../libexample/libexamplemm/example-widget.h:34: error: previous declaration of 'typedef struct _ExampleWidget ExampleWidget'

int width = 0;
if(pixbuf)
{
  width = pixbuf-&gt;get_width();
}

m_button1.signal_clicked().connect( sigc::bind&lt;Glib::ustring&gt;( sigc::mem_fun(*this, &amp;HelloWorld::on_button_clicked), "button 1") );

my_connection.disconnect();

server.signal_something().connect(
  sigc::mem_fun(client, &amp;Client::on_server_something) );

sigc::connection  Glib::SignalIdle::connect(const sigc::slot&lt;bool&gt;&amp; slot,
                                    int priority = Glib::PRIORITY_DEFAULT_IDLE);

sigc::connection Glib::SignalIO::connect(const sigc::slot&lt;bool,Glib::IOCondition&gt;&amp; slot,
                                 int fd, Glib::IOCondition condition,
                                 int priority = Glib::PRIORITY_DEFAULT);

sigc::connection Glib::SignalTimeout::connect(const sigc::slot&lt;bool&gt;&amp; slot,
                                      unsigned int interval, int priority = Glib::PRIORITY_DEFAULT);

sigc::signal&lt;void, bool, int&gt; signal_something;

sigc::signal&lt;void,int&gt;::iterator signal&lt;void,int&gt;::connect( const sigc::slot&lt;void,int&gt;&amp; );

std::list&lt; Glib::RefPtr&lt;Gdk::Pixbuf&gt; &gt; listPixbufs;
Glib::RefPtr&lt;Gdk::Pixbuf&gt; refPixbuf = Gdk::Pixbuf::create_from_file(filename);
listPixbufs.push_back(refPixbuf);

typedef struct _ExampleWidget ExampleWidget;

struct _ExampleWidget
{
  ...
};

virtual void on_button_clicked(Glib::ustring data);

void ExampleWindow::on_printoperation_done(Gtk::PrintOperationResult result, const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)
{
  if (result == Gtk::PRINT_OPERATION_RESULT_ERROR)
    //notify user
  else if (result == Gtk::PRINT_OPERATION_RESULT_APPLY)
    //Update PrintSettings with the ones used in this PrintOperation

  if (! op-&gt;is_finished())
    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(*this, &amp;ExampleWindow::on_printoperation_status_changed), op));
}

void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&lt;PrintFormOperation&gt;&amp; op)
{
  if (op-&gt;is_finished())
    //the print job is finished
  else
    //get the status with get_status() or get_status_string()

  //update UI
}

void init()
{
  Gtk::Main::init_gtkmm_internals(); //Sets up the g type system and the Glib::wrap() table.
  wrap_init(); //Tells the Glib::wrap() table about the libsomethingmm classes.
}

void on_button_clicked();

class some_class
{
    void on_button_clicked();
};

some_class some_object;

main()
{
    Gtk::Button button;
    button.signal_clicked().connect( sigc::ptr_fun(&amp;on_button_clicked) );
    button.signal_clicked().connect( sigc::mem_fun(some_object, &amp;some_class::on_button_clicked) );
}

void on_insert(const TextBuffer::iterator&amp; pos, const Glib::ustring&amp; text, int bytes)

{
  Gtk::Button aButton;
  aButton.show();
  ...
  app-&gt;run();
}
»Verborgene« Spalten# keep this file sorted alphabetically, one language code per line
de
ja#include &lt;gtkmm.h&gt;#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SListHandler&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')$ ./plug &amp;$ ./socket./docextract_to_xml.py -s ~/checkout/gnome/gtk+/gtk/ &gt; gtk_docs.xml
// creates its own adjustments
Gtk::TextView textview;
// uses the newly-created adjustment for the scrollbar as well
Gtk::Scrollbar vscrollbar (textview.get_vadjustment(), Gtk::ORIENTATION_VERTICAL);// note to translators: don't translate the "[noun]" part - it is
// just here to distinguish the string from another "jumps" string
text = strip(gettext("jumps[noun]"), "[noun]");//compiler error - no conversion from ustring to int.
int number = row[m_Columns.m_col_text];2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010<application>gtkmm</application> 3 fügt einige neue Klassen hinzu:<application>gtkmm</application> und Win32<application>gtkmm</application> im Vergleich zu Qt<application>gtkmm</application> ist ein Wrapper<application>gtkmm</application> stellt vier grundlegende Knopftypen bereit:<classname>Gtk::ToolItem</classname>s können dann zur Gruppe hinzugefügt werden, zum Beispiel so:<filename>libsomethingmm</filename>: Enthält generierte und handgeschriebene .h- und .cc-Dateien.<filename>libsomethingmm</filename>: Der Ordner der obersten Ebene.<filename>private</filename>: Enthält generierte <filename>*_p.h</filename>-Dateien.<filename>src</filename>: Enthält .hg- und .ccg-Quelldateien.<function>_WRAP_METHOD()</function>, <function>_WRAP_SIGNAL()</function> und <function>_WRAP_PROPERTY()</function><literal>drag_begin</literal>: Stellt DragContext bereit.<literal>drag_end</literal>: Stellt DragContext bereit.<literal>lower</literal>: unterer Grenzwert<literal>page_increment</literal>: Erhöhung/Verringerung des Wertes, wenn auf einem Knopf die Maustaste 2 gedrückt wird<literal>page_size</literal>: nicht genutzt<literal>step_increment</literal>: Erhöhung/Verringerung des Wertes, wenn auf einem Knopf die Maustaste 1 gedrückt wird<literal>upper</literal>: oberer Grenzwert<methodname>get_preferred_height_for_width_vfunc()</methodname>: Berechnet die minimale und natürliche Höhe des Containers, falls die Breite angegeben wurde.<methodname>get_preferred_heigth_vfunc()</methodname>: Berechnet die minimale und natürliche Höhe des Containers.<methodname>get_preferred_height_vfunc()</methodname>: Berechnet die minimale und natürliche Höhe des Widgets.<methodname>get_preferred_width_for_height_vfunc()</methodname>: Berechnet die minimale und natürliche Breite des Containers, falls die Höhe angegeben wurde.<methodname>get_preferred_width_vfunc()</methodname>: Berechnet die minimale und natürliche Breite des Containers.<methodname>get_preferred_width_vfunc()</methodname>: Berechnet die minimale und natürliche Breite des Widgets.<methodname>get_request_mode_vfunc()</methodname>: (optional) Gibt den vom Widget bevorzugten <literal>Gtk::SizeRequestMode</literal> zurück.<methodname>get_request_mode_vfunc()</methodname>: Gibt den vom Container bevorzugten <literal>Gtk::SizeRequestMode</literal> zurück.<methodname>on_add()</methodname>: Ein Kind-Widget zum Container hinzufügen.<methodname>on_map()</methodname>: (optional)<methodname>on_remove()</methodname>: Ein Kind-Widget aus dem Container entfernen.<methodname>on_unmap()</methodname>: (optional)<placeholder-1/> (oder <placeholder-2/> für Dateinamen)<placeholder-1/>-Beispielpaket<varname>description</varname>: Eine Kurzbeschreibung der Ressource als UTF-8-kodierte Zeichenkette<varname>mime_type</varname>: Der MIME-Type der RessourceEin <classname>ProgressBar</classname> ist standardmäßig horizontal und von links nach rechts angeordnet, aber Sie können die vertikale Ausrichtung mit der Methode <methodname>set_orientation()</methodname> erreichen.Ein Smartpointer agiert wie ein normaler Zeiger. Hier sind einige Beispiele.AM_CPPFLAGSAM_CPPFLAGS = ... -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"AM_CXXFLAGSATKAboutDialogZugriff auf WidgetsAktionenAktivitätsmodusHinzufügen von Objekten zur Liste der kürzlich geöffneten DateienHinzufügen von ZeilenHinzufügen von UnterzeilenHinzufügen von WidgetsAnpassungenNach dem Starten von <filename>socket</filename> sollte Folgendes im Terminal ausgegeben werden:Danach sollten Sie etwa Folgendes sehen:AhlstedtAlignmentEin verbessertes »Hello World«AnastasovLebensdauer einer AnwendungAnwenden von TagsAspectFrameAssistentEinschätzen der Anzeigegröße von ZeichenkettenAsynchrone VorgängeGrundlegende Typ-ÄquivalenteGrundlegende TypenGrundlagenBevor Sie versuchen, <application>gtkmm</application> 3.0 zu installieren, müssen Sie zuerst diese anderen Pakete installieren.BernhardBinden weiterer ArgumenteBjarne Stroustrup, »The C++ Programming Language«, 4. Ausgabe – Abschnitt 34.3BoxenErstellen von <application>gtkmm</application> auf Win32KnopfButtonBoxButtonBoxesKnöpfeC-Programmierer nutzen die Funktion <function>sprintf()</function> zum Erstellen und Verketten von Strings. C++ favorisiert Streams, aber leider erschwert dieser Ansatz die Übersetzungen, da jedes Textfragment separat übersetzt wird und Übersetzer keine Möglichkeiten haben, die Fragmente neu anzuordnen, um der Grammatik ihrer Sprache gerecht zu werden.C-TypC++-TypCairo und PangoRufen Sie <methodname>show()</methodname> auf, um das Widget anzuzeigen.Änderungen in <application>gtkmm</application> 3Ändern der AuswahlKapitel zu »Zeichnen mit Cairo«Kapitel zum »Drucken«.Kapitel zu Tastaturereignissen.CheckButtonAnkreuzfelderChrisKlassen-MakrosZwischenablage - IdealZwischenablage - EinfachColorChooserDialogKombinierte AuswahlfelderComboBoxComboBox mit EintragComboBox mit EingabeComboBoxTextComboBoxText mit EintragVergleich mit anderen SignalsystemenZusammenstellung der ZeichenkettenVerbinden von Plugs und SocketsVerbinden von Signal-HandlernKonstruktor-MakrosKonstruktorenContainer-WidgetsKopierenKopierenKopieren des ProjektgerüstsErstellen der .hg- und .ccg-DateienErzeugen Ihrer eigenen SignaleCummingGegenwärtig unterstützt <application>gettext</application> keine Nicht-ASCII-Zeichen im Quellcode (also Zeichen mit einem Code über 127). Zum Beispiel können Sie kein Copyright-Zeichen verwenden (©).Benutzerdefinierter ContainerBenutzerdefinierte ContainerBenutzerdefiniertes WidgetBenutzerdefinierte WidgetsDISTCLEANFILES = ... intltool-extract \
                 intltool-merge \
                 intltool-update \
                 po/.intltool-merge-cacheDanielDavidStandardformatierungAbhängigkeitenDereferenzierungDesigner ohne Programmierkenntnisse können grafische Benutzeroberflächen entwerfen und bearbeiten.DialogeVerschiedene Verbindungstypen in CairoVerbindungen von Signal-Handlern trennenDokumentationStruktur zur DokumentationserstellungZiehen und AblegenDragContextZeichnen von Kreisbögen und KreisenZeichenbereich - BögenZeichenbereich - BildZeichenbereich - LinienZeichenbereich - TextZeichenbereich - Dünne LinienZeichnen von gebogenen LinienZeichnen von GrafikenZeichnen gerader LinienZeichnen von TextZeichnen von Text mit PangoZeichnen dünner LinienZeichnen mit relativen KoordinatenDynamische Zuweisung mit manage() und add()Dynamische Zuweisung mit new und deleteBearbeitbare ZellenElstnerWird ausgegeben, wenn der Knopf angeklickt und losgelassen wird.Wird ausgegeben, wenn der Knopf gedrückt wird.Wird ausgegeben, wenn der Knopf losgelassen wird.Wird ausgegeben, wenn der Mauszeiger das Fenster mit dem Knopf verlässt.Wird ausgegeben, wenn sich der Mauszeiger über dem Fenster mit dem Knopf befindet.EintragVervollständigung des EintragsBeispiel für die Vervollständigung eines EintragsEintrag mit SymbolEintrag mit FortschrittsbalkenAufzählungen.EventBoxBeispielBeispielanwendung: Eine Uhr mit CairoBeispieleAusnahmen in Signal-HandlernPDF-ExportErweitern des DruckdialogsFerreiraFileChooserFileChooserDialogFiltern kürzlich geöffneter DateienZum Schluss überprüfen Sie den Status. Zum Beispiel <placeholder-1/>FontChooserDialogFür jede darzustellende Seite werden folgende Signale ausgegeben: <placeholder-1/>Beispiel für <classname>Pango::Analysis</classname> in <filename>item.hg</filename>: <placeholder-1/>Beispiel aus <filename>icontheme.hg</filename>: <placeholder-1/>Beispielsweise in <filename>rectangle.hg</filename>: <placeholder-1/>Beispiel in Pangomm für <filename>layoutline.hg</filename>: <placeholder-1/>Zum Beispiel,Zum Beispiel, <placeholder-1/>Beispiel aus <classname>Gdk::RGBA</classname>: <placeholder-1/>Beispiel aus <classname>Glib::Checksum</classname>: <placeholder-1/>Beispiel aus <filename>accelgroup.hg</filename>: <placeholder-1/>Beispiel aus <filename>entry.hg</filename>: <placeholder-1/>Beispiel aus <filename>enums.hg</filename>: <placeholder-1/>Folgendes könnte beispielsweise problematisch sein:Zum Beispiel:Detailliertere Informationen über Signale finden Sie im <link linkend="chapter-signals">Anhang</link>.Für Einfachauswahlen können Sie einfach <methodname>get_selected()</methodname> folgendermaßen aufrufen:RahmenVollständiges BeispielGTK+ 3.0Erstellen der .defs-Dateien.Erzeugen der enums.defsErzeugen der methods.defsHilfe zu Übersetzungen erhaltenErmitteln von WertenGlade und Gtk::BuilderGlib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(
  double value,
  double lower,
  double upper,
  double step_increment = 1,
  double page_increment = 10,
  double page_size = 0);Glib::RefPtr&lt;Gtk::Application&gt; app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");Glib::RefPtr&lt;Gtk::Clipboard&gt; refClipboard = Gtk::Clipboard::get();

//Targets:
std::vector&lt;Gtk::TargetEntry&gt; targets;
targets.push_back( Gtk::TargetEntry("example_custom_target") );
targets.push_back( Gtk::TargetEntry("UTF8_STRING") );

refClipboard-&gt;set( targets,
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_get),
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_clear) );Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =
    Gtk::ListStore::create(m_Columns);Glib::RefPtr&lt;Gtk::RecentInfo&gt; info;
try
{
  info = recent_manager-&gt;lookup_item(uri);
}
catch(const Gtk::RecentManagerError&amp; ex)
{
  std::cerr &lt;&lt; "RecentManagerError: " &lt;&lt; ex.what() &lt;&lt; std::endl;
}
if (info)
{
  // item was found
}Glib::RefPtr&lt;Gtk::RecentManager&gt; recent_manager = Gtk::RecentManager::get_default();
recent_manager-&gt;add_item(uri);Glib::RefPtr&lt;Gtk::TextBuffer::Mark&gt; refMark =
    refBuffer-&gt;create_mark(iter);Glib::RefPtr&lt;Gtk::TextBuffer::Tag&gt; refTagMatch =
    Gtk::TextBuffer::Tag::create();
refTagMatch-&gt;property_background() = "orange";Glib::RefPtr&lt;Gtk::TextBuffer::TagTable&gt; refTagTable =
    Gtk::TextBuffer::TagTable::create();
refTagTable-&gt;add(refTagMatch);
//Hopefully a future version of <application>gtkmm</application> will have a set_tag_table() method,
//for use after creation of the buffer.
Glib::RefPtr&lt;Gtk::TextBuffer&gt; refBuffer =
    Gtk::TextBuffer::create(refTagTable);Glib::RefPtr&lt;Gtk::TextChildAnchor&gt; refAnchor =
    refBuffer-&gt;create_child_anchor(iter);Glib::RefPtr&lt;Gtk::TreeModelSort&gt; sorted_model =
    Gtk::TreeModelSort::create(model);
sorted_model-&gt;set_sort_column(columns.m_col_name, Gtk::SORT_ASCENDING);
treeview.set_model(sorted_model);Glib::RefPtr&lt;Gtk::TreeSelection&gt; refTreeSelection =
    m_TreeView.get_selection();Glib::RefPtr&lt;Gtk::UIManager&gt; m_refUIManager =
    Gtk::UIManager::create();
m_refUIManager-&gt;insert_action_group(m_refActionGroup);
add_accel_group(m_refUIManager-&gt;get_accel_group());Glib::ustringGlib::ustring und std::iostreamsGlib::ustring strText = row[m_Columns.m_col_text];
int number = row[m_Columns.m_col_number];Glib::ustring ui_info =
    "&lt;ui&gt;"
    "  &lt;menubar name='MenuBar'&gt;"
    "    &lt;menu action='MenuFile'&gt;"
    "      &lt;menuitem action='New'/&gt;"
    "      &lt;menuitem action='Open'/&gt;"
    "      &lt;separator/&gt;"
    "      &lt;menuitem action='Quit'/&gt;"
    "    &lt;/menu&gt;"
    "    &lt;menu action='MenuEdit'&gt;"
    "      &lt;menuitem action='Cut'/&gt;"
    "      &lt;menuitem action='Copy'/&gt;"
    "      &lt;menuitem action='Paste'/&gt;"
    "    &lt;/menu&gt;"
    "  &lt;/menubar&gt;"
    "  &lt;toolbar  name='ToolBar'&gt;"
    "    &lt;toolitem action='Open'/&gt;"
    "    &lt;toolitem action='Quit'/&gt;"
    "  &lt;/toolbar&gt;"
    "&lt;/ui&gt;";

m_refUIManager-&gt;add_ui_from_string(ui_info);Glib::ustring ui_info =
    "&lt;ui&gt;"
    "  &lt;popup name='PopupMenu'&gt;"
    "    &lt;menuitem action='ContextEdit'/&gt;"
    "    &lt;menuitem action='ContextProcess'/&gt;"
    "    &lt;menuitem action='ContextRemove'/&gt;"
    "  &lt;/popup&gt;"
    "&lt;/ui&gt;";

m_refUIManager-&gt;add_ui_from_string(ui_info);GruppenGtk::Alignment
Gtk::Arrow
Gtk::AspectFrame
Gtk::Bin
Gtk::Box
Gtk::Button
Gtk::CheckButton
Gtk::Fixed
Gtk::Frame
Gtk::Grid
Gtk::Image
Gtk::Label
Gtk::MenuItem
Gtk::Notebook
Gtk::Paned
Gtk::RadioButton
Gtk::Range
Gtk::ScrolledWindow
Gtk::Separator
Gtk::Table (deprecated from <application>gtkmm</application> version 3.4)
Gtk::ToolbarGtk::Application und BefehlszeilenoptionenGtk::Box(Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL, int spacing = 0);
void set_spacing(int spacing);
void set_homogeneous(bool homogeneous = true);Gtk::Button* pButton = new Gtk::Button("_Something", true);Gtk::CellRendererToggle* pRenderer =
    Gtk::manage( new Gtk::CellRendererToggle() );
pRenderer-&gt;signal_toggled().connect(
    sigc::bind( sigc::mem_fun(*this,
        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)
);Gtk::DrawingArea myArea;
Cairo::RefPtr&lt;Cairo::Context&gt; myContext = myArea.get_window()-&gt;create_cairo_context();
myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);
myContext-&gt;set_line_width(2.0);Gtk::Entry* entry = m_Combo.get_entry();
if (entry)
{
  // The Entry shall receive focus-out events.
  entry-&gt;add_events(Gdk::FOCUS_CHANGE_MASK);

  // Alternatively you can connect to m_Combo.signal_changed().
  entry-&gt;signal_changed().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_changed) );

  entry-&gt;signal_activate().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_activate) );

  entry-&gt;signal_focus_out_event().connect(sigc::mem_fun(*this,
    &amp;ExampleWindow::on_entry_focus_out_event) );
}Gtk::EventBox();Gtk::TreeModel::Children children = row.children();Gtk::TreeModel::Row row = *iter;Gtk::TreeModel::Row row = m_refModel-&gt;children()[5]; //The fifth row.
if(row)
  refTreeSelection-&gt;select(row);Gtk::TreeModel::iterator iter = m_Combo.get_active();
if(iter)
{
  Gtk::TreeModel::Row row = *iter;

  //Get the data for the selected row, using our knowledge
  //of the tree model:
  int id = row[m_Columns.m_col_id];
  set_something_id_chosen(id); //Your own function.
}
else
  set_nothing_chosen(); //Your own function.Gtk::TreeModel::iterator iter = m_refListStore-&gt;append();Gtk::TreeModel::iterator iter = m_refModel-&gt;children().begin()
if(iter)
  refTreeSelection-&gt;select(iter);Gtk::TreeModel::iterator iter_child =
    m_refTreeStore-&gt;append(row.children());Gtk::TreeView::Column* pColumn =
  Gtk::manage(new Gtk::TreeView::Column("Icon Name"));

// m_columns.icon and m_columns.iconname are columns in the model.
// pColumn is the column in the TreeView:
pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);
pColumn-&gt;pack_start(m_columns.iconname);

m_TreeView.append_column(*pColumn);Gtk::TreeView::Column* pColumn = treeview.get_column(0);
if(pColumn)
  pColumn-&gt;set_sort_column(m_columns.m_col_id);Gtk::Widget* pMenubar = m_refUIManager-&gt;get_widget("/MenuBar");
pBox-&gt;add(*pMenuBar, Gtk::PACK_SHRINK);Gtk::Window window;
window.set_default_size(200, 200);Handgeschriebene QuelldateienHandgeschriebene KonstruktorenUmgang mit <literal>button_press_event</literal>Hello WorldHello World 2»Hello World« in <application>gtkmm</application>HelloWorld::HelloWorld()
:
  m_button ("Hello World")
{
  set_border_width(10);
  m_button.signal_clicked().connect(sigc::mem_fun(*this,
    &amp;HelloWorld::on_button_clicked));
  add(m_button);.
  m_button.show();
}Es folgt eine Liste einiger dieser Widgets:Hier ist ein Beispiel für eine Callback-Methode:Hier ist ein einfaches Beispiel: <placeholder-1/>Hier ist ein etwas umfangreicheres Beispiel von Slots in Aktion:Hier ist ein Beispiel für einen <classname>SpinButton</classname> in Aktion:Hier ein Beispiel für diese Technik:Funktionsweise von GettextNutzung des GNOME-Git als ÜbersetzerINTLTOOL_FILES = intltool-extract.in \
                 intltool-merge.in \
                 intltool-update.inIT_PROG_INTLTOOL([0.35.0])

GETTEXT_PACKAGE=programname
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [The domain to use with gettext])
AM_GLIB_GNU_GETTEXT

PROGRAMNAME_LOCALEDIR=[${datadir}/locale]
AC_SUBST(PROGRAMNAME_LOCALEDIR)IdealUntätigkeitsfunktionenIn <filename>configure.ac</filename>, <placeholder-1/>In der Datei Makefile.am der obersten Ebene: <placeholder-1/>Beinhaltet die andren Dateien.Unabhängig sortierte Ansichten des gleichen ModellsInfoBarInitialisierungInstallationInstallation von <application>gtkmm</application> mit <application>jhbuild</application>Installieren aus den QuellenInstallation und Verwendung der Git-Version von <application>gtkmm</application>Internationalisierung und LokalisierungIntltool-READMEEinführungEs akzeptiert optional ein zusätzliches Argument: <placeholder-1/>JonathonJongsmaTastaturereignisseTastaturereignisse - EinfachKingKjellL10N-Richtlinien für EntwicklerBezeichnungFehlende EigenschaftenLaursenEs wird weniger C++-Code benötigt.LinienstileListStoreListStore, für ZeilenLaden der .glade-DateiHauptmenüHauptmenü-BeispielMakefile.am-DateienVerwaltete WidgetsMarkieren von Zeichenketten für die ÜbersetzungMarkoMarkierungenSpeicherverwaltungMenüs und WerkzeugleistenMessageDialogMethoden-MakrosMethodenMicrosoft WindowsVerschiedene WidgetsMischen der APIs von C und C++ModelColumns()
{ add(m_col_id); add(m_col_name); }

  Gtk::TreeModelColumn&lt;int&gt; m_col_id;
  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_name;
};

ModelColumns m_columns;Anpassen der ErstellungsdateienAnpassen der Liste der kürzlich geöffneten DateienÜberwachung von Ein- und AusgabenDie meisten unserer Beispiele verwenden diese Technik.VerschiebenWidgets mit mehreren ObjektenMurrayMurray CummingNicolai M. Josuttis, »The C++ Standard Library« - Abschnitt 4.2Nicht-modaler AboutDialogNormale C++-SpeicherverwaltungBeachten Sie, dass Sie Aktionen für Untermenüs wie auch für Menüeinträge angeben müssen.ReitermappeNun werfen wir wieder einen Blick auf die Verbindung:Objekte und Funktionen.Das bedeutet natürlich, dass Sie <classname>RefPtr</classname>s in Standardcontainern speichern können, wie <classname>std::vector</classname> oder <classname>std::list</classname>.OleWeitere MakrosÜberschreiben von Standard-SignalhandlernÜbersichtPKG_CHECK_MODULES([MYAPP], [gtkmm-3.0 &gt;= 3.8.0])Packen Sie das Widget mit dem entsprechenden Aufruf in einen Container, zum Beispiel <methodname>Gtk::Container::add()</methodname> oder <methodname>pack_start()</methodname>.PackenSeite einrichtenPangoTeile des Kapitels zur »Internationalisierung«Teile der Aktualisierung von gtkmm 2 auf gtkmm 3.EinfügenPedroDas vorliegende Dokument kann gemäß den Bedingungen der GNU Free Documentation License (GFDL), Version 1.2 oder jeder späteren, von der Free Software Foundation veröffentlichten Version ohne unveränderbare Abschnitte sowie ohne Texte auf dem vorderen und hinteren Buchdeckel kopiert, verteilt und/oder modifiziert werden. Eine Kopie der GFDL erhalten Sie auf der Webseite der Free Software Foundation, oder schreiben Sie an: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.FallstrickeAuf <ulink url="https://wiki.gnome.org/Projects/gtkmm/MSWindows/BuildingGtkmm"> https://wiki.gnome.org/Projects/gtkmm/MSWindows/BuildingGtkmm</ulink> finden Sie Anweisungen, wie Sie gtkmm unter Windows erstellen können.PlugsPlugs und SocketsBeispiel für Plugs und SocketsPopup-KontextmenüKontextmenüKontextmenü-BeispielKontextmenüsVorkompilierte PaketeEinrichten Ihres ProjektsVerhindern der ZeilenauswahlVorschauPrintOperationDruckenDrucken - EinfachProbleme in der C-API.Programmierung mit <application>gtkmm</application> 3Fortschrittsbalken werden verwendet, um den Status eines laufenden Vorgangs anzuzeigen. Zum Beispiel kann ein <classname>ProgressBar</classname> zeigen, wie viel von einer Aufgabe bereits abgearbeitet wurde.ProgressBarSetzt den erzeugten Code in #ifdef-Blöcke.RadioknöpfeRadioButtonRecentChooserRecentManagerKürzlich geöffnete DokumenteEmpfohlene TechnikenReferenzDarstellen von TextNeu sortierbare ZeilenRessourcenReaktion auf ÄnderungenDie C-Dokumentation wiederverwendenRiederGleiche Zeichenketten, unterschiedliche SemantikRollbalken-WidgetsScrolledWindowRollenAbschnitt zu Gtk::Grid.Festlegen eines PräfixEinrichten von jhbuildFestlegen von WertenGemeinsame RessourcenSignalhandler-SequenzSignaleSignale und Eigenschaften.EinfachEinfaches BeispielEinfaches Beispiel für RecentChooserDialogEinfaches TextbeispielEinfache oder mehrfache AuswahlDaher sollten Sie diese Situation entweder gänzlich vermeiden oder <ulink url="http://developer.gnome.org/glibmm/unstable/classGlib_1_1ustring.html"><function>Glib::ustring::compose()</function></ulink> verwenden, das folgend Syntax unterstützt: <placeholder-1/>SocketsSortierungSortierung durch Anklicken von SpaltenQuelltextQuellen und ZieleAngeben von CellRenderer-DetailsSpinButtonTabelleTagTableTagsTags und FormatierungZieleTesten und Hinzufügen von ÜbersetzungenTextViewDas »changed«-SignalDie .hg- und .ccg-DateienDas <classname>Gtk::Button</classname>-Widget gibt folgende Signale aus, wobei Sie jedoch meist nur das <literal>clicked</literal>-Signal verarbeiten müssen:Das Argument <parameter>options</parameter> akzeptiert eine dieser drei Optionen: <placeholder-1/>Der PufferDas Cairo-ZeichenmodellDie ZwischenablageDas Zeichenbereich-WidgetDas ModellDer RefPtr-SmartpointerDie AuswahlDas TreeView-WidgetDie AnsichtDie Argumente zu <methodname>Action::create()</methodname> geben den Namen der Aktion an, und wie es in Menüs und Werkzeugleisten erscheint.Die ErstellungsstrukturDas gewählte ObjektDie an den C-Präprozessor übergebenen Befehlszeilenoptionen.Die an den C++-Compiler übergebenen Befehlszeilenoptionen.Die EinschränkungenDer EintragDas folgende Beispiel demonstriert die Verwendung von Radioknöpfen (<classname>RadioButton</classname>):Das folgende Beispielprogramm benötigt eine Befehlszeilenoption. Der Quellcode zeigt zwei Wege, wie in Kombination mit <classname>Gtk::Application</classname> mit Befehlszeilenoptionen umgegangen werden kann.Die Makros werden in den folgenden Abschnitten detaillierter beschrieben.Die Makros in diesem Beispiel bewirken Folgendes: <placeholder-1/>Das ModellDer Name der Bibliothek, wie libsomethingmm.Der native GTK+-Druckdialog verfügt über einen Vorschauknopf, aber Sie können die Vorschau auch direkt aus der Anwendung starten: <placeholder-1/>Die nächsten zwei Codezeilen erzeugen ein Fenster und legen dessen (initiale) Standardgröße fest:Die RegelnDie ausgewählten ZeilenDie TextspalteThe window ID is: 69206019Dann starten Sie das <filename>socket</filename>-Programm:Es gibt einige typische Fehler, denen Sie möglicherweise auch selbst begegnen werden. Dieser Abschnitt könnte Ihnen dabei helfen, dies zu vermeiden.Es gibt fünf verschiedene grundlegende Stile, wie in diesem Bild gezeigt:Es gibt einige zusätzliche optionale Argumente: <placeholder-1/>Zwei grundlegende Strategien können angewendet werden: <placeholder-1/>In examples/others/dnd finden Sie ein komplexeres Beispiel.Es gibt nur ein optionales zusätzliches Argument: <placeholder-1/>Diese Abhängigkeiten haben wiederum ihre eigenen Abhängigkeiten, wie die folgenden Anwendungen und Bibliotheken:Dieses BuchDieses Buch setzt gutes Verständnis von C++ und in der Erstellung von C++-Programmen voraus.Dieses Beispiel erzeugt einen Knopf mit einer Grafik und einer Beschriftung.Dieses Beispiel implementiert ein Widget, das ein Penrose-Dreieck zeichnet.Dies hat folgende Vorteile: <placeholder-1/>Dies ist ein voll funktionsfähiges Beispiel, welches benutzerdefinierte Signale definiert und nutzt.Dies wird im drag_and_drop-Beispiel demonstriert.Dieses Makro wird verwendet, wenn Sie <literal>gettext</literal> in Ihrem Quellcode initialisieren.Im einfachsten Fall müssen Sie zum Hinzufügen einer Datei zur Liste der kürzlich geöffneten Dateien nur deren Adresse angeben. Zum Beispiel:Am Anfang unserer Einführung in <application>gtkmm</application> beginnen wir mit dem einfachsten möglichen Programm. Es erzeugt ein leeres, 200 mal 200 Pixel großes Fenster.Um die Auswahl zu ändern, geben Sie einen <classname>Gtk::TreeModel::iterator</classname> oder <classname>Gtk::TreeModel::Row</classname> folgendermaßen an:Um das zu erreichen, müssen Sie die Methode <methodname>pulse()</methodname> in regelmäßigen Abständen aufrufen. Außerdem können Sie mit der Methode <methodname>set_pulse_step()</methodname> die Schrittweite wählen.UmschaltknöpfeToggleButtonToolItem-ReferenzToolItemGroup-ReferenzToolPaletteBeispiel für ToolPaletteToolPalette-ReferenzMinihilfeMinihilfen-ReferenzMinihilfenTreeModel::iterator iter = refTreeSelection-&gt;get_selected();
if(iter) //If anything is selected
{
  TreeModel::Row row = *iter;
  //Do something with the row.
}TreeModelSort-ReferenzTreeSortable-ReferenzTreeStoreTreeStore, für eine HierarchieTreeView - Ziehen und AblegenTreeView - Bearbeitbare ZellenTreeView - ListStoreTreeView - Aufklappendes KontextmenüTreeView - TreeStoreUIManagerUnix und LinuxUnübliche WörterAktualisieren Sie Ihre <literal>DISTCLEANFILES</literal>: <placeholder-1/>Verwenden Sie <methodname>Gtk::Builder::get_widget_derived()</methodname> folgendermaßen: <placeholder-1/>Nützliche MethodenVerwendung von Glib::DispatcherVerwendung eines <application>gtkmm</application>-WidgetsVerwendung eines ModellsVerwenden abgeleiteter WidgetsVerwendubg von Nicht-ASCII-Zeichen in ZeichenkettenVerwendung der Git-Version von <application>gtkmm</application>VineErklärung der einzelnen Zeilen des BeispielsWenn der Knopf sein <literal>clicked</literal>-Signal ausgibt, wird <methodname>on_button_clicked()</methodname> aufgerufen.Warum sollte ich <application>gtkmm</application> anstelle von GTK+ verwenden?Widget-ReferenzWidgetsWidgets ohne X-WindowsWidgets und ChildAnchorsArbeiten mit dem Quelltext von gtkmmWrapping von C-Bibliotheken mit gmmprocSchreiben von Signal-HandlernSchreiben der vfuncs.defsX-EreignissignaleSie können auch einen Signalhandler beim Aufruf von <methodname>ActionGroup::add()</methodname> angeben. Dieser Signalhandler wird aufgerufen, wenn eine Aktion über das Menü oder einen Werkzeugleistenknopf aktiviert wird.Sie können <classname>RefPtr</classname>s ganz einfach wie normale Zeiger kopieren. Aber im Gegensatz zu normalen Zeigern müssen Sie sich keine Gedanken um die darunterliegenden Instanzen machen.Sie wissen nie, wie viel Platz ein String auf dem Bildschirm einnimmt, wenn er erst einmal übersetzt ist. Es kann durchaus die doppelte Größe der englischen Originalversion sein. Glücklicherweise expandiert <application>gtkmm</application> die Widgets zur Laufzeit auf die erforderliche Größe.Sie sollten kryptische Abkürzungen, Slang oder Jargon vermeiden. So etwas ist recht schwierig zu übersetzen und oft selbst für Muttersprachler nur schwer verständlich. Beispielsweise sollten Sie »application« gegenüber »app« bevorzugen._CLASS_BOXEDTYPE_CLASS_BOXEDTYPE_STATIC_CLASS_BOXEDTYPE_STATIC( C++-Klasse, C-Klasse )_CLASS_GENERIC_CLASS_GENERIC( C++-Klasse, C-Klasse )_CLASS_GOBJECT_CLASS_GTKOBJECT_CLASS_GTKOBJECT()_CLASS_INTERFACE_CLASS_OPAQUE_COPYABLE_CLASS_OPAQUE_REFCOUNTED_CTOR_DEFAULT_DEFS()_IGNORE / _IGNORE_SIGNAL_IGNORE(C-Funktionsname 1, C-Funktionsname2, usw.)_IGNORE_SIGNAL(C signal name 1, C signal name2, etc)_IMPLEMENTS_INTERFACE_IMPLEMENTS_INTERFACE()_IMPLEMENTS_INTERFACE(C++ interface name)_MEMBER_GET / _MEMBER_SET_MEMBER_GET(C++-Name, C-Name, C++-Typ, C-Typ)_MEMBER_GET(x, x, int, int)_MEMBER_GET_GOBJECT / _MEMBER_SET_GOBJECT_MEMBER_GET_GOBJECT(C++-Name, C-Name, C++-Typ, C-Typ)_MEMBER_GET_PTR / _MEMBER_SET_PTR_MEMBER_GET_PTR(C++-Name, C-Name, C++-Typ, C-Typ)_MEMBER_SET(C++-Name, C-Name, C++-Typ, C-Typ)_MEMBER_SET_GOBJECT(C++ name, C name, C++ type, C type)_MEMBER_SET_PTR(C++ name, C name, C++ type, C type)_PINCLUDE()_WRAP_CTOR_WRAP_ENUM_WRAP_ENUM_DOCS_ONLY_WRAP_GERROR_WRAP_METHOD_WRAP_METHOD( C++ method signature, C function name)_WRAP_METHOD_DOCS_ONLY_WRAP_METHOD_DOCS_ONLY(C-Funktionsname)_WRAP_PROPERTY_WRAP_PROPERTY(C-Eigenschaftsname, C++-Typ)_WRAP_SIGNAL_WRAP_SIGNAL( C++ signal handler signature, C signal name)_WRAP_VFUNC_WRAP_VFUNC( C++ method signature, C function name)adj-&gt;signal_value_changed().connect(sigc::bind&lt;MyPicture*&gt;(sigc::mem_fun(*this,
    &amp;cb_rotate_picture), picture));adjustment-&gt;signal_changed();atkmmbinding_namebindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);boolbool DemoWindow::select_function(
    const Glib::RefPtr&lt;Gtk::TreeModel&gt;&amp; model,
    const Gtk::TreeModel::Path&amp; path, bool)
{
  const Gtk::TreeModel::iterator iter = model-&gt;get_iter(path);
  return iter-&gt;children().empty(); // only allow leaf nodes to be selected
}bool ExampleWindow::on_button_press_event(GdkEventButton* event)
{
  if( (event-&gt;type == GDK_BUTTON_PRESS) &amp;&amp;
      (event-&gt;button == 3) )
  {
    m_Menu_Popup-&gt;popup(event-&gt;button, event-&gt;time);
    return true; //It has been handled.
  }
  else
    return false;
}bool MyArea::on_draw(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr)
{
  Glib::RefPtr&lt;Gdk::Pixbuf&gt; image = Gdk::Pixbuf::create_from_file("myimage.png");
  // Draw the image at 110, 90, except for the outermost 10 pixels.
  Gdk::Cairo::set_source_pixbuf(cr, image, 100, 80);
  cr-&gt;rectangle(110, 90, image-&gt;get_width()-20, image-&gt;get_height()-20);
  cr-&gt;fill();
  return true;
}Beispiel für KnöpfeCairocairommcell.property_editable() = true;class HelloWorld : public Gtk::Window
{

public:
  HelloWorld();
  virtual ~HelloWorld();

protected:
  //Signal handlers:
  virtual void on_button_clicked();

  //Member widgets:
  Gtk::Button m_button;
};class RadioButtons : public Gtk::Window
{
public:
    RadioButtons();

protected:
    Gtk::RadioButton m_rb1, m_rb2, m_rb3;
};

RadioButtons::RadioButtons()
  : m_rb1("button1"),
    m_rb2("button2"),
    m_rb3("button3")
{
    Gtk::RadioButton::Group group = m_rb1.get_group();
    m_rb2.set_group(group);
    m_rb3.set_group(group);
}class RadioButtons : public Gtk::Window
{
public:
    RadioButtons();
};

RadioButtons::RadioButtons()
{
    Gtk::RadioButton::Group group;
    Gtk::RadioButton *m_rb1 = Gtk::manage(
      new Gtk::RadioButton(group,"button1"));
    Gtk::RadioButton *m_rb2 = manage(
      new Gtk::RadioButton(group,"button2"));
      Gtk::RadioButton *m_rb3 = manage(
        new Gtk::RadioButton(group,"button3"));
}clickedconfigure.acconstversioncontext-&gt;save();
context-&gt;translate(x, y);
context-&gt;scale(width / 2.0, height / 2.0);
context-&gt;arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI);
context-&gt;restore();custom_c_callbackcustom_default_handlercustom_vfunccustom_vfunc_callbackdeprecateddisplay_message("Getting ready for i18n.");display_message(_("Getting ready for i18n."));doubleenterenumserrthrowevent_box.add(child_widget);functionsg++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`gbooleangchar*gdk-pixbufgdoubleGettext-Handbuchgintglibglibmmgmmproc-Parameterverarbeitunggnomemm_hellogtk.defsgtk_enums.defsgtk_methods.defsgtk_signals.defsgtk_vfuncs.defsgtkmmgtkmm_helloguintgunicharifdefintint cols_count = m_TreeView.append_column_editable("Alex", m_columns.alex);
Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
if(pColumn)
{
  Gtk::CellRendererToggle* pRenderer =
    static_cast&lt;Gtk::CellRendererToggle*&gt;(pColumn-&gt;get_first_cell());
  pColumn-&gt;add_attribute(pRenderer-&gt;property_visible(), m_columns.visible);
  pColumn-&gt;add_attribute(pRenderer-&gt;property_activatable(), m_columns.world);int main(int argc, char** argv)
{
  Glib::RefPtr&lt;Gtk::Application&gt; app = Gtk::Application::create(argc, argv, "org.gtkmm.example");

  HelloWorld helloworld;
  return app-&gt;run(helloworld);
}intltool-update --potleavelib_LTLIBRARIESlibsigc++ 2.0m4-Umwandlungenm4-Initialisierungenm_TextView.add_child_at_anchor(m_Button, refAnchor);m_TreeView.append_column("Messages", m_Columns.m_col_text);m_TreeView.set_model(m_refListStore);m_box.pack_start(m_Button1);
m_box.pack_start(m_Button2);m_button1.signal_clicked().connect( sigc::mem_fun(*this,
  &amp;HelloWorld::on_button_clicked) );m_combo.set_entry_text_column(m_columns.m_col_name);m_combo.signal_changed().connect( sigc::mem_fun(*this,
      &amp;ExampleWindow::on_combo_changed) );m_frame.add(m_box);m_rb2.set_group(m_rb1.get_group()); //doesn't workm_refActionGroup = Gtk::ActionGroup::create();

m_refActionGroup-&gt;add( Gtk::Action::create("MenuFile", "_File") );
m_refActionGroup-&gt;add( Gtk::Action::create("New", "_New"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_new) );
m_refActionGroup-&gt;add( Gtk::Action::create("ExportData", "Export Data"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_open) );
m_refActionGroup-&gt;add( Gtk::Action::create("Quit", "_Quit"),
  sigc::mem_fun(*this, &amp;ExampleWindow::on_action_file_quit) );m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,
    &amp;DemoWindow::select_function) );modules = [ 'gtkmm' ]moduleset = 'gnome-suites-core-deps-3.12'no_default_handlerno_slot_copyoderpangommpkg-configpressedpropertiesrefBuffer-&gt;apply_tag(refTagMatch, iterRangeStart, iterRangeStop);refBuffer-&gt;insert_with_tag(iter, "Some text", refTagMatch);refClipboard-&gt;request_contents("example_custom_target",
    sigc::mem_fun(*this, &amp;ExampleWindow::on_clipboard_received) );refClipboard-&gt;request_targets( sigc::mem_fun(*this,
    &amp;ExampleWindow::on_clipboard_received_targets) );refTreeSelection-&gt;selected_foreach_iter(
    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );

void TheClass::selected_row_callback(
    const Gtk::TreeModel::iterator&amp; iter)
{
  TreeModel::Row row = *iter;
  //Do something with the row.
}refTreeSelection-&gt;set_mode(Gtk::SELECTION_MULTIPLE);refTreeSelection-&gt;signal_changed().connect(
    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)
);refreturnrefreturn_ctypereleasedreturn app-&gt;run(window);row[m_Columns.m_col_text] = "sometext";signalsslot_callbackslot_namesrc/main.cc
src/other.ccstd::cout &lt;&lt; Glib::ustring::compose(
             _("Current amount: %1 Future: %2"), amount, future) &lt;&lt; std::endl;

label.set_text(Glib::ustring::compose(_("Really delete %1 now?"), filename));std::cout &lt;&lt; _("Current amount: ") &lt;&lt; amount
          &lt;&lt; _(" Future: ") &lt;&lt; future &lt;&lt; std::endl;

label.set_text(_("Really delete ") + filename + _(" now?"));std::ostringstream output;
output.imbue(std::locale("")); // use the user's locale for this stream
output &lt;&lt; percentage &lt;&lt; " % done";
label-&gt;set_text(Glib::locale_to_utf8(output.str()));std::stringstd::vector&lt; Glib::RefPtr&lt;Gtk::RecentInfo&gt; &gt; info_list = recent_manager-&gt;get_items();Mario Blättermann <mario.blaettermann@gmail.com>, 2010-2012typedef Gtk::TreeModel::Children type_children; //minimise code length.
type_children children = refModel-&gt;children();
for(type_children::iterator iter = children.begin();
    iter != children.end(); ++iter)
{
  Gtk::TreeModel::Row row = *iter;
  //Do something with the row - see above for set/get.
}vfuncsvoid ExampleWindow::on_button_delete()
{
  Glib::RefPtr&lt;Gtk::TreeSelection&gt; refTreeSelection =
      m_treeview.get_selection();
  if(refTreeSelection)
  {
    Gtk::TreeModel::iterator sorted_iter =
        m_refTreeSelection-&gt;get_selected();
    if(sorted_iter)
    {
      Gtk::TreeModel::iterator iter =
          m_refModelSort-&gt;convert_iter_to_child_iter(sorted_iter);
      m_refModel-&gt;erase(iter);
    }
  }
}void ExampleWindow::on_clipboard_get(
    Gtk::SelectionData&amp; selection_data, guint /* info */)
{
  const std::string target = selection_data.get_target();

  if(target == "example_custom_target")
    selection_data.set("example_custom_target", m_ClipboardStore);
}void ExampleWindow::on_clipboard_received(
    const Gtk::SelectionData&amp; selection_data)
{
  Glib::ustring clipboard_data = selection_data.get_data_as_string();
  //Do something with the pasted data.
}void ExampleWindow::on_clipboard_received_targets(
  const std::vector&lt;Glib::ustring&gt;&amp; targets)
{
  const bool bPasteIsPossible =
    std::find(targets.begin(), targets.end(),
      example_target_custom) != targets.end();

  // Enable/Disable the Paste button appropriately:
  m_Button_Paste.set_sensitive(bPasteIsPossible);
}void cb_rotate_picture (MyPicture* picture)
{
  picture-&gt;set_rotation(adj-&gt;get_value());
...void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, int x)
{
    context-&gt;save();
    // change graphics state
    // perform drawing operations
    context-&gt;restore();
}void drag_dest_set(const std::vector&lt;Gtk::TargetEntry&gt;&amp; targets,
    Gtk::DestDefaults flags, Gdk::DragAction actions);void drag_source_set(const std::vector&lt;Gtk::TargetEntry&gt;&amp; targets,
      Gdk::ModifierType start_button_mask, Gdk::DragAction actions);void pack_start(Gtk::Widget&amp; child,
                Gtk::PackOptions options = Gtk::PACK_EXPAND_WIDGET,
                guint padding = 0);wrap_init_flagsxgettext -a -o my-strings --omit-header *.cc *.h